feat: allow a turn to preserve the thread's current runtime mode

Open
#12,913 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
56/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

Start at the thread.turn.start payload handling and the thread.turn-start-requested reducer, comparing its runtimeMode behavior with the conditional modelSelection handling. Check the thread.runtime-mode.set command to preserve deliberate mode changes. Done means a turn can preserve the thread's existing mode without overwriting it, while explicit mode changes still work.

Written by the indexing model from the issue text.

Description

enhancement via-triage
What I'm building

An external orchestrator that drives t3 threads over the WebSocket RPC. It starts turns on
threads that a human also uses interactively.

Problem

runtimeMode is required on every thread.turn.start payload — not optional, not
create-only — and the thread.turn-start-requested reducer writes it onto the thread
unconditionally. That is asymmetric with modelSelection, which the same reducer writes
conditionally.

The t3 client itself never notices, because it resolves
explicitOverride ?? thread.runtimeMode ?? project.default on every turn — i.e. it echoes
the thread's current mode unless the user deliberately changed it, and there is a separate
thread.runtime-mode.set command for that case.

For any other client this means: to send a turn at all, you must already know the thread's
current mode. Any constant you pick silently re-permissions a live session — sending
full-access to a thread the operator has put in approval-required widens permissions
without the operator doing anything, and the change persists on the thread afterwards.

Observed in 0.0.42, reading the installed build.

Ask

Let a turn say "keep what the thread has": accept thread.turn.start without runtimeMode,
or accept an explicit "preserve" sentinel, and in that case leave the stored thread mode
untouched — the conditional treatment modelSelection already gets. thread.runtime-mode.set
stays the way a client changes the mode deliberately.

Dominant language
TypeScript
Stars
23.3k
Forks
6k
Avg merge
10h 57m
Merged PRs (30d)
365

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pingdotgg/t3code

All issues in pingdotgg/t3code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.