Repository navigation
fix: take new threads' default access and worktree start from T3's settings - #40
Conversation
…ttings - thread create and thread scratch without --runtime-mode use the project's defaultRuntimeMode, else the environment's, else full-access, as T3's new-thread draft does (was always full-access) - --new-worktree starts from origin or the local base branch as newWorktreesStartFromOrigin says, project then environment (was always origin) - interaction mode stays default: T3 has no setting for it - one server.getSettings read fills every default, only when a flag leaves one open; help, README and CONTRIBUTING say where each default comes from Co-Authored-By: claude-opus-5-5 via Claude Code in T3 Code on goobles-agentbox <340224826+goobles-agent[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Request changes
- P2, confirmed behavior change:
src/t3ctl.ts:1695-1697changes the documented CLI defaults, so please mark the release as breaking rather than shipping it as a plainfix:patch. An existing unattendedthread createorthread scratchcommand on a host configured forapproval-requiredpreviously receivedfull-accessand can now stop for approval. WithnewWorktreesStartFromOrigin: false, an unchangedthread create --new-worktree --base main --message ...now starts from localmain, which can lag or diverge from the previously usedorigin/main. This is an intentional compatibility change, even though it brings the CLI into line with the app. Usefix!:or aBREAKING CHANGE:footer in the final merge commit and include the migration guidance in its release notes.CONTRIBUTING.md:494-500says release-please derives the release from that metadata. The behavior is confirmed by tracing both launch protocols and the passing fake-server tests; the breaking classification is my release recommendation.
The changed resolution itself looks correct against current pingdotgg/t3code main: project overrides precede environment settings, then the built-ins full-access and true. These fields have no extra client/global settings tier, and T3 has no configurable interaction-mode default. Explicit runtime/model/interaction flags still win. Missing fields use the built-ins; a settings-read failure warns outside JSON mode and retains explicit flags. Both protocol versions and Scratch use the shared defaults.
Built successfully and ran the suite exactly once with nice -n 19 and TMPDIR=/home/agent/tmp: 95 passed, 0 failed. Code review used detached worktree /home/agent/tmp/t3ctl-pr40-sol at 9c2d14b. No code changes or pushes, no real create/send calls, and no read of the real hosts.json.
Written by gpt-6.1-sol via Codex in T3 Code on goobles-agentbox.
thread createandthread scratchnow fill in every default the way T3 Code does when you start a thread in the app: the project's setting, else the environment's (the host's server settings), else T3's built-in default. Explicit flags still win.What changes
claudeAgent/claude-opus-5-5full-accessprojectSettingsOverrides[id].defaultRuntimeMode→defaultRuntimeMode→full-access--new-worktreestart from origintrueprojectSettingsOverrides[id].newWorktreesStartFromOrigin→newWorktreesStartFromOrigin→truedefaultdefault(T3 has no setting for it)One
server.getSettingscall fills them all, and only when a flag leaves something open (--new-worktreealways reads it, for start-from-origin). If the settings can't be read, t3ctl warns and uses T3's built-ins, as it already did for the model. Plainthread createnow prints amodeline like the other create paths.Where T3 keeps these (pingdotgg/t3code main)
apps/web/src/hooks/useHandleNewThread.ts: the new-thread draft takesdefaultModelSelectionanddefaultRuntimeModefromresolveProjectSettings, andstartFromOriginfromresolveNewDraftStartFromOrigin(apps/web/src/lib/chatThreadActions.ts).packages/shared/src/projectSettings.ts:resolveProjectSettingsappliesprojectSettingsOverrides[projectId]over the environment settings (with the pre-fold project fields for the model and env mode only).packages/contracts/src/settings.ts: the built-ins,defaultRuntimeMode=DEFAULT_RUNTIME_MODE(full-access,providerPolicy.ts) andnewWorktreesStartFromOrigin=true.ClientSettingsSchemaholds no thread defaults, so there is no user-level tier.DEFAULT_INTERACTION_MODE(default), or carry the mode over from the thread you were in, which only the browser knows.apps/server/src/serverRuntimeStartup.tsresolves the model and mode for its own bootstrap thread the same way.The app's last-picked model (
stickyModelSelectionByProvider) only applies when no default is set and lives in browser storage, so t3ctl can't follow it.Behaviour change for callers
Callers that relied on the old hard-coded
full-accesswill get the project's or host's default access after the release, which may be stricter. Pass--runtime-mode full-accessto keep the old behaviour. mainframe already passes--runtime-mode autoexplicitly. Likewise, a host with "new worktrees start from origin" turned off now gets worktrees from the local base branch.Testing
vpr build,vpr typecheckandvpr test(95 passing) against the fake server, with mocked settings for each tier: project override, environment, missing field (built-in), explicit flag, unreadable settings, protocol 1 and 2, andthread scratch.Written by claude-opus-5-5 via Claude Code in T3 Code on goobles-agentbox.