[Bug]: `t3_project_update` saves scripts and project defaults that are ignored once project settings are folded #14991
Note
Written by Claude Opus 5.5 on behalf of @AngeloTadeucci, and filed at Angelo's request.
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/server
Steps to reproduce#
- Use an install whose
settings.jsonhasprojectSettingsFolded: true. The one-time fold of legacy project settings sets it at serverSettings.ts#L615. - From an agent, call
t3_project_updatewith a setup action:scripts: [{ id: "setup", name: "Setup", command: "...", icon: "configure", runOnWorktreeCreate: true }]. The response echoes the newscripts, andt3_project_readreturns them. - Call
t3_thread_launchfor that project withworkspaceStrategy: { type: "worktree", ... }.
Expected behavior#
The setup action runs in the new worktree. If the tool can no longer change this setting, it should say so instead of reporting success.
Actual behavior#
The worktree is created and no setup action runs. Once settings are folded, resolveProjectScripts
returns the projectSettingsOverrides entry or the environment default and never reads the project's
own scripts
at projectScripts.ts#L23.
t3_project_update still writes to the project aggregate, so the change is saved and then never read.
Writing the same action into projectSettingsOverrides.<projectId>.defaultProjectScripts in
settings.json made it run on the next launch, which confirms where the runtime reads from.
The same gate covers defaultModelSelection and defaultThreadEnvMode in resolveProjectOverrides
at projectSettings.ts#L151,
so I expect those fields of t3_project_update to be ignored too. I only verified scripts at
runtime, and I did not check autoPull.
Impact#
Minor bug or occasional failure
Version or commit#
desktop 0.0.46-nightly.20261003.2610; source read at 8ed276c246b6
Environment#
Windows 11 Pro 10.0.26200, agent on Claude Code through the T3 MCP server
Workaround#
Edit projectSettingsOverrides in settings.json, or set the action in the project settings UI.
juliusmarminge added labelsbug
juliusmarminge added labelsvia-triage
Confirming on macOS (
0.0.46-nightly.20261007.2774), and it's broader thant3_project_update. A "Setup worktree" action (runOnWorktreeCreate: true) added afterprojectSettingsFoldedwas set is ignored too, and so is the checked-int3.json. Every new worktree thread silently skipped setup:ProjectSetupScriptRunner.runForThreadreturnedno-scriptin about 0.02 ms and never opened a terminal, with nothing shown in the UI.Writing
projectSettingsOverrides.<projectId>.defaultProjectScriptsfixed it immediately, without a restart.Suggest falling back to
project.scriptswhen there's no override, or showing a warning when arunOnWorktreeCreatescript won't run. For us the impact was "every new worktree unusable until set up by hand", higher than "Minor".Note
Written by Claude Opus 5.5 on behalf of @jheinem1, and posted at their request.
Confirming on
0.0.46-nightly.20261008.2819(Windows desktop app connected to a WSL server). It isn't limited to setup actions: scripts saved throught3_project_updatealso never appear in the thread header's project scripts menu. The menu shows only Add project script, even after a reload. Two projects were affected. In both,t3_project_readandprojection_projects.scripts_jsonshow the scripts, and the client's IndexedDB cache contains them, but the menu is empty becauseprojectSettingsFoldedistrue.A script added through the UI went to
projectScriptOverridesandprojectSettingsOverrides.<projectId>.defaultProjectScriptsinsettings.jsonand showed up right away. Writing the tool-set scripts into those same keys is the workaround.Note
Written by Claude Opus 5.5 and posted at the account holder's request.
This still happens on macOS
0.0.46-nightly.20261014.3132(5a4e998). Two MCP entry points not covered above hit the same gap:t3_project_createwith aworkspaceRootacceptsscriptsin the same call and saves them on the project record (handlers.ts#L248-L249). On a folded install, a project created with arunOnWorktreeCreateaction has no setup action from the start.delegate_taskwithisolation: "worktree"promises a checkout "with project setup completed before the child starts" (tools.ts#L68). For a project created as above, the worktree was created and the child started without setup.ProjectSetupScriptRunner.runForThreadreturned in about 0.03 ms without opening a terminal, so the setup stage was markedskipped(ThreadLaunchService.ts#L617). Both thedelegate_taskandtask_statusresults reportedcompleted, with nothing to show setup had not run. The file the setup action writes was missing in the child's worktree.
Agents use worktree isolation to get a prepared checkout, so until this is fixed, a skipped setup should at least appear in the
delegate_taskandtask_statusresults.Still happens on macOS
0.1.1-nightly.20261017.3272. Scripts set throught3_project_updatewere saved to the project record and returned byt3_project_read, but the header's scripts menu stayed empty, including after quitting and reopening the app. Writing the same scripts toprojectSettingsOverrides.<projectId>.defaultProjectScriptsinsettings.jsonmade them appear.Confirming this behavior on October 19, 2026 in a T3 Code MCP-connected project. It also reproduces with a regular project action, not only a setup/worktree hook:
t3_project_updatesucceeded with a script namedBuild release APK, using idbuild-release-apk, iconbuild, andrunOnWorktreeCreate: false.t3_project_readreturns that script from the project record, but it does not appear in the project's actions menu.- A separate action (
a) added through the UI does appear in the menu, but is not returned byt3_project_read.
The script id is a valid slug and the icon is an allowed value, so this does not appear to be a malformed payload. This confirms the project-record/settings-override mismatch described here for a normal menu action too. I verified persistence and visibility; I have not tested whether the MCP-written action runs.
Note
Written by Claude Opus 5.5 on behalf of @dmeyerhoff.
Possibly the same root cause from the other side: on a folded install, scripts added through the GUI are saved in
settings.json→projectSettingsOverrides.<projectId>.defaultProjectScripts, butt3_project_readreturnsscripts: []for that project (andprojection_projects.scripts_jsonis[]). So an agent can't see the project's actions. T3 Code (Beta) 0.1.0, macOS.Still happens on
0.1.3-nightly.20261024.3617(Linux server, macOS desktop client), and confirming thedefaultThreadEnvModecase at runtime. An agent set a project todefaultThreadEnvMode: "local"throught3_project_update, andt3_project_readstill returnslocal, but new threads follow the global default instead. After switching global toworktree, every new thread created from web/desktop (26 of 26) and mobile (3 of 3) got a fresh worktree, leaving 29 unneeded worktrees in about 2.5 days. I've applied the project-scope override from triage as a workaround.On #22827: it notes that existing aggregate-only saves stay inactive until re-saved. This install is that case. The value was saved through the tool after the fold and is still ignored, while
t3_project_readkeeps reporting it, so nothing tells the user to re-save. Reconciling existing project values into overrides once (or showing the mismatch) would cover them.Confirming this exact mismatch on October 29, 2026 in T3 Code:
t3_project_updateaccepted the four Listwork actions and returned them, but the Settings → Code → Projects → Actions panel still showed “No actions configured.” The reason matches this issue: the project tool writes the legacy project record while the panel readsprojectSettingsOverrides.<projectId>.defaultProjectScripts. I cleared the misleading legacy scripts and applied the actions through the settings override workaround.Note
Written by Claude Opus 5.5 on behalf of @stanley50z, and posted at their request.
Still happens on Windows desktop
0.1.6-preview.20261030.3948and macOS0.1.3-nightly.20261025.3669, both withprojectSettingsFolded: true.One case not covered above: removing scripts is lost too. With actions saved in
projectSettingsOverrides.<projectId>.defaultProjectScripts,t3_project_updatewithscripts: []returns an empty list andt3_project_readagrees, but the override insettings.jsonis unchanged.resolveProjectScriptskeeps returning the old actions, so an agent asked to remove stale actions reports success while they stay in the menu. Writing"defaultProjectScripts": []into the override removes them.Note
Written by Claude Opus 5.5 on behalf of @Averus89, and posted at their request.
Still happens on Linux server
t3 v0.1.5withprojectSettingsFolded: true, and it affects scheduled tasks: three projects gotdefaultModelSelection(Claude Sonnet, Codex gpt-6.1-sol, Grok 4.7 Fast) viat3_project_update, andt3_project_readreturns them, but their interval and webhook tasks run as the model of the thread that created the task (claude-opus-5-5). For us that meant an agent meant to be a different reviewer was the same model.schedule_taskhas no model field, so there is no way to choose the model per task.Note
Written by Claude Opus 5.5 (Claude Code, via T3 Code triage) on behalf of @DanielJomphe, and posted at their request.
Important
Fixing the write path, as triage proposed, does not fix the read path.
t3_project_readandt3_project_listreturn the legacy project row for the folded fields. Edits made in Settings never reach that row. So agents keep reporting stale settings even aftert3_project_updatewrites toprojectSettingsOverrides. This happens with no MCP write involved.Seen on macOS desktop
0.1.8-nightly.20261105.4218(337c5858, same asmaintoday), withprojectSettingsFolded: true.1. Stale reads with no
t3_project_updateinvolved#ProjectService.toProjectreturns the rawprojection_projectscolumns fordefaultModelSelection,defaultThreadEnvMode,autoPullandscripts(apps/server/src/project/ProjectService.ts:177-181).- Project A's column held
codex / gpt-5.6-luna / xhighfrom before the fold. The model was later reset in Settings, so the override has nodefaultModelSelection, the page shows the inherited Opus 5.5 / High, and new threads start on it.t3_project_liststill returned Luna, and an agent told the user the project was set to Luna. - All 12 projects return
autoPull: false. The globaldefaultAutoPullistrue, and no project overrides it.
Fix needed: the read tools return the effective value for each folded field, ideally with its source (
projectorenvironment). Alternatively, they drop those fields.2. A one-time reconcile from the row would undo resets made in Settings#
An earlier comment suggested copying existing project values into the overrides once. For project A, that would bring back the Luna model the user had reset. The fold itself guards against this. Its comment says "projectSettingsFolded prevents restarts from undoing later UI resets" (
serverSettings.ts:605). After the fold, the row is not a reliable source for any of these fields. The safe direction is to stop reading it, or to null the folded columns, not to copy from it.3.
schedule_taskwith no parent thread reads the raw model#OrchestratorMcpService.scheduleTaskusesparent?.thread.modelSelection ?? project.defaultModelSelection(lines 2001 and 1040–1050). This differs from the scheduled-task report above, where a parent thread's model was used. Without a parent thread, it takes the stale row model. When the row is null, it fails with "has no default model", even when Settings defines a project or environment default. Once writes go to the overrides, the row stays null for new settings, so this failure becomes the usual result. It should useresolveProjectSettings(...).defaultModelSelection, ast3_thread_launchalready does (mcp/toolkits/project/handlers.ts:183).Local cleanup:
t3_project_updatewithdefaultModelSelection: nullcleared project A's stale column. There is no equivalent forautoPullorscripts, because writing effective values into the row would only make copies that go stale again.- Project A's column held
Note
Written by Claude Opus 5.5 (Claude Code, via T3 Code triage) on behalf of the account holder, and posted at their request.
Still happens on macOS desktop
0.1.8-nightly.20261105.4234(8b570d2) withprojectSettingsFolded: true. This is the read side ofdefaultModelSelection, and it caused an agent to launch a thread on the wrong model.What happened
- A project was registered again at a new folder through
t3_project_create, after the fold had already run. Its project record gotdefaultModelSelection: claude-fable-5-1, the value the old project at the old folder had.projectSettingsOverrides.<projectId>has nodefaultModelSelection. - The app ignores the record value, as described above. The project settings page and new threads in the UI use the environment default, Opus 5.5 High.
t3_project_listandt3_project_readstill return the record'sdefaultModelSelectionas the project's default. An agent dispatching work witht3_thread_launchread it and passed it asmodelSelection. The thread started on a model the user had never chosen and could not find anywhere in Settings. They had to stop it and restart it on the right model.
Repro
- Use an install with
projectSettingsFolded: true. - Give a project a record-level model with
t3_project_createort3_project_update(defaultModelSelection: { instanceId: "claudeAgent", model: "<model A>" }). Set the environment default to a different model B. - Settings and new UI threads show model B.
t3_project_listandt3_project_readreport model A as the project default.
One more path, read from code but not run
OrchestratorMcpService.projectDefaultModelSelection(OrchestratorMcpService.tsL1040-L1050 at8b570d2, still present onmain) returns the record field. A caller with no parent thread would get the ignored record model, or a "has no default model" error when only the override is set.Suggestion Have the project tools report the resolved value from
resolveProjectSettings, or at least not present a record-only value as the default once settings are folded.Workaround Clear the stale record value with
t3_project_updateanddefaultModelSelection: null. Verified here: the record andt3_project_readnow returnnull, so the tools no longer contradict the settings page. The environment default and the project's override entry were not changed.- A project was registered again at a new folder through
I hit this too, and I dug into the source. The mechanism checks out.
- Version: server
0.1.8-nightly.20261106.4262, Linux x64. I read main at 6577c6b61851, so line numbers may drift a bit. - What happened: The project had
projectSettingsOverrides[<project>].defaultProjectScriptsset to[]. An agent then calledt3_project_updatewith two scripts. The tool reported success, but the UI still showed no scripts. - Why:
resolveProjectScripts(packages/shared/src/projectScripts.ts) returnsprojectSettingsOverrides[id].defaultProjectScriptswhenever it's defined, even if it's[]. After folding, it falls back to the globaldefaultProjectScriptsand never readsproject.scripts.t3_project_updatewritesproject.scripts, so once settings are folded, nothing it writes is ever shown. - Workaround that worked: Writing the scripts into that
projectSettingsOverridesentry insettings.jsonmade them appear without a restart.
Suggested fix: when settings are folded, have
t3_project_updatewrite scripts toprojectSettingsOverrides[id].defaultProjectScripts, or return an error saying the value won't take effect.
Posted by Haiku 5.5 acting on behalf of Thatcher.
- Version: server
Note
Written by Claude Opus 5.5 on behalf of @dnevzorov, and posted at their request.
Still happens on macOS
0.1.7, withprojectSettingsFolded: true. Actions saved witht3_project_updateon 5 projects never showed in Settings → Projects → Actions.Workaround without editing
settings.json: write the same actions tot3.jsonat the repo root (dropid), then use Import from t3.json in Settings → Projects → Actions. The import writesprojectSettingsOverrides.<projectId>.defaultProjectScripts.Note
Written by Claude Opus 5.5 on behalf of @hardikg2907, and posted at their request.
Still reproduces on desktop
0.1.8-nightly.20261107.4340(macOS).One more visible symptom: the scripts also never show in the app. The thread's side panel lists only "Add project script".
- Create a project with
t3_project_create, then set four scripts witht3_project_update. t3_project_readreturns all four, and a secondt3_project_updatemovesupdatedAt.- In the app, the side panel for a thread in that project shows no scripts.
settings.jsonhasprojectSettingsFolded: trueand an emptyprojectSettingsOverrides, which matches the triage above: the app reads only the overrides. The project was created over MCP, so its id has themcp:prefix. I don't think the prefix matters, but I note it in case it does.- Create a project with
+1 ran into this issue several times
Still reproduces on v0.1.9 and v0.1.11 (Linux, server running as a user systemd service), and the source is unchanged on main at f2ec853.
- Project with two scripts in the project record (set via
t3_project_update): onerunOnWorktreeCreate: true, onerunOnSettle: true.projectSettingsFolded: true; Settings → Projects → Actions shows neither. - New thread with "New worktree": the worktree is created, but the setup script never runs. No
.env.local, nonode_modules. - Trace:
ProjectSetupScriptRunner.runForThreadtakes ~14 ms and exitsSuccess. Its only child span issql.transaction(the thread-shell read); no terminal is opened.ThreadLaunchServicepassesproject.scriptsin directly, soProjectService.getByIddoesn't appear. ThenresolveProjectScriptshits theprojectSettingsFoldedbranch (packages/shared/src/projectScripts.ts:17) and returns[], so the runner returnsno-script. t3_project_updatestill acceptsscriptsand commits them only to the project record (ProjectService.update→project.meta.update), which nothing reads after the fold.
Note for anyone else testing
runOnSettle: it fires on settle, not archive. Archiving only enqueues a sweep, and archived threads are never auto-settled.Workaround: re-add the actions in Settings → Projects → Actions, or use
t3.json+ "Import from t3.json".- Project with two scripts in the project record (set via
Note
🤖 Claude Opus 5.5 responding on behalf of nacusiancii
On
0.1.12-nightly.20261120.4994(Linux x64,projectSettingsFolded: true), the read side now follows the override forscripts, butt3_project_updatestill doesn't write to it. The write is now dropped completely, and the tool still reports success.What I saw
- I called
t3_project_updatewith onerunOnWorktreeCreate: truescript on a project that had no override. The call succeeded andupdatedAtchanged, but the returned project had"scripts": []. Earlier reports in this issue say the response used to echo the scripts back. t3_project_readalso returned[], andsettings.jsonwas unchanged.- I then wrote the same script by hand to
projectSettingsOverrides.<id>.defaultProjectScripts. After that,t3_project_readandt3_project_listreturned it. So reads now resolvescriptsthrough the override, but writes still never reach it. defaultThreadEnvModedoesn't follow the override on read yet. A project withdefaultThreadEnvMode: "local"in its override comes back asnullfromt3_project_read.
Suggested fix: now that reads go through
projectSettingsOverrides, havet3_project_update(andt3_project_create) writescriptstoprojectSettingsOverrides.<id>.defaultProjectScriptswhen settings are folded. Until then, it should return an error instead of success. Agents trust the success and report worktree setup as configured when it isn't. We've hit this twice on different projects.- I called
#39676, now on main: Project read, list, update, and successful Settings-enriched create responses now report the actions resolved from Settings, so agents can see the same saved actions the app runs.
Not done: The issue still asks for t3_project_update writes to change the actions and project defaults actually used after settings are folded; this merge leaves that write path unchanged.
Closing; open a new issue if what is left still matters to you.
juliusmarminge closed this
Sign in to join this conversation.
Note
Grok responding on behalf of Julius.
Triage#
Thanks for the precise report, @AngeloTadeucci. We confirmed it on
mainat8ed276c246. Once project settings have been folded,t3_project_updatestill savesscriptson the project and returns them, but launch never reads that copy. We didn't find an existing issue for this.What launch reads:
ProjectSetupScriptRunnercallsresolveProjectScriptsinprojectScripts.ts. If there's aprojectSettingsOverrides[projectId].defaultProjectScriptsentry, it wins. IfprojectSettingsFoldedis set and there's no entry, launch uses the environment default and never looks at the project's ownscripts.t3_thread_launchdoes passproject.scriptsto the runner (ThreadLaunchService.ts), but the resolver drops them. The folded-settings test already expects that behavior.What the tool writes:
t3_project_updateonly callsprojects.update(handlers.ts), which saves to the project record. The tool says it updates project settings through the same service as the app (tools.ts), but the app's Actions UI now writes toprojectSettingsOverridesinstead.t3_project_readreturns the project record, so the echo you saw is the stored value, not the list launch will run.t3_project_createalso tells callers to setscriptsordefaultModelSelectionafterwards witht3_project_update(handlers.ts), so that follow-up hits the same gap. No MCP tool writes per-project overrides, andt3_environment_preferences_updateonly covers the whole environment.Folded is the normal state:
foldLegacyProjectSettingsturns the flag on at the next trusted settings load once any project row or legacy override exists, and after that it never reads the project record again (serverSettings.ts).The other fields: you read
resolveProjectOverridescorrectly (projectSettings.ts). Once folded, the project record'sdefaultModelSelectionanddefaultThreadEnvModeare ignored for new threads created in the app.autoPullis also never read on this path, even before folding. Auto-pull readsdefaultAutoPullfrom the resolved settings (VcsStatusBroadcaster.ts), and the fold copies the stored value there only once. Title, icon, favicon, and workspace root still belong on the project record, so updating those works fine.Workaround: set the action in the project settings UI, or write
projectSettingsOverrides.<projectId>.defaultProjectScriptsthe way you already did. The model, env mode, and auto-pull work the same way, throughdefaultModelSelection,defaultThreadEnvMode, anddefaultAutoPull.We're leaving this open as a bug. When
t3_project_updatereports success, the change should actually reach what launch and the new-thread UI read, which means writing these fields intoprojectSettingsOverrides.