Repository navigation
Description
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
Summary
Follow-up to #34342. #34775 syncs the T3 thread title to the native Claude session name at the start of a turn. A title change at any other time is not applied until the user sends another message:
| # | Scenario | Expected | Actual |
|---|---|---|---|
| 1 | The generated title replaces the first-prompt seed a few seconds into the first turn | The native session gets the generated title | The native name stays the 50-character seed for the whole first turn, and forever in a one-turn thread |
| 2 | Rename or Regenerate title while a turn is running | The native session is renamed right away | Nothing is sent; the name changes when the next turn starts |
| 3 | Rename or Regenerate title after the last turn | The native session is renamed | Nothing is sent until another message is sent |
The end of a run does not trigger a sync either. #34342 listed "including a live one" and "the generated title replacing the seed" under Expected; the shipped fix covers turn starts only.
Steps to reproduce
- Start a new Claude thread with a prompt longer than 50 characters that keeps Claude busy for a minute or more.
- Wait for T3's generated title to replace the seed in the sidebar.
- Read the native name: the last
custom-titleentry in~/.claude/projects/<encoded cwd>/<session id>.jsonl, orclaude --resumein the thread's folder. It is still the seed. - Rename the thread in the sidebar while the turn is running. The native name does not change.
- Let the turn finish. The native name still does not change.
- Send a second message. The native name changes at that moment.
Expected behavior
Every T3 title change reaches the native session when it happens: the generated title replacing the seed, a manual rename, Regenerate title. That includes a session whose turn is running and a session that gets no further turn.
Actual behavior
One thread on 0.1.10-nightly.20261115.4723, times in UTC:
| Time | Event |
|---|---|
| 10:37:59.867 | Thread created with the seed title |
| 10:38:00.168 | Claude process launched with the SDK title option = seed |
| 10:38:03.444 | Generated title committed (thread.title.regeneration.complete) |
| 10:38:03.716 | CLI reports session_title_changed = seed |
| 10:38:42.555 | Regenerate title finished (unchanged) |
| 10:39:20.174 | Manual rename (thread.metadata.update) |
| 10:38 - 11:03 | 21 custom-title entries written by the CLI, all the seed |
| 11:03:41.566 | Turn 1 result; the native name is still the seed 88 s later |
| 11:05:09.459 | Turn 2 requested |
| 11:05:09.582 | session_title_changed = the thread title; first agent-name entry |
Root cause (main @ 70abb6c)
- The only
rename_sessioncall site is instartTurn: afteropenQuery,apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts:13022-13029comparesappliedSessionTitleswithturnInput.appThread.titleand sends the rename.steerTurndoes not, and nothing runs at turn end. turnInput.appThreadis a snapshot taken when the turn start begins (ProviderTurnStartService.ts:422, passed at:1819). At spawn the same snapshot feeds the SDKtitleoption (ClaudeAdapterV2.ts:12682,:2252-2253) and is recorded as applied (:12761-12763).- Title changes only update the projection: a rename (
Orchestrator.ts:4853) and a generated or regenerated title (:5151) both emitthread.metadata-updated(:5242-5244).ProviderAdapterV2SessionRuntimehas no title method, so nothing reaches the adapter. - Scenario 1 should affect every new thread: title generation starts alongside the first turn and takes seconds, so the CLI is spawned with the seed and the generated title lands later. In the thread above it landed 270 ms before the post-open comparison, which still compared the stale snapshot (seed against seed).
- The CLI looks able to take the request during a turn (not tested live).
SDKControlRenameSessionRequest"Sets the user-facing title for the current session" with no turn-state condition (sdk.d.ts:5280-5295, SDK 0.3.321). In CLI 2.1.325rename_sessionis dispatched from the same control loop asinterruptand its handler has no busy check. T3 already sends control requests to a running turn:provider-session.apply-model-selection(Orchestrator.ts:5275-5313,ClaudeAdapterV2.ts:13989,:12506).
Proposed fix
- Add an optional
applyThreadTitletoProviderAdapterV2SessionRuntime, next toapplyModelSelection(packages/provider-core/src/server/ProviderAdapter.ts:748-752). - When
thread.metadata.updateorthread.title.regeneration.completechanges the title, enqueue aprovider-session.apply-thread-titleeffect for the thread's active provider thread, the wayOrchestrator.ts:5275-5313enqueuesprovider-session.apply-model-selection(EffectWorker.ts:207-214). - Claude adapter:
- Live query: send
renameSession(title)with the existing 10 s timeout. Record the title inappliedSessionTitleson success; forget it on failure so the next turn retries. - Process still opening: keep the title as the wanted one and compare against it in
startTurninstead of the turn snapshot. This closes the 270 ms race above. - No process: leave it to the next turn as today, or call the SDK's exported
renameSession(sessionId, title, { dir })(sdk.d.ts:3382-3388) so a rename with no following turn still reachesclaude --resume.
- Live query: send
- Tests in the
ClaudeAdapterV2 session title syncblock: a title change during a running turn sends one rename and the next turn sends none; a title that lands between the snapshot and the open is applied by the first turn; a failed live rename is retried at the next turn; a native/renameis not reverted.
Impact
Minor bug or occasional failure
Version or commit
0.1.10-nightly.20261115.4723 (11c425b, contains #34775 and #36879); code checked again at main @ 70abb6c
Environment
Windows 11 Pro, T3 Code (Nightly) desktop app, Claude provider (@anthropic-ai/claude-agent-sdk ^0.3.321 per apps/server/package.json, Claude Code CLI 2.1.325 started through a local launcher set as the Claude binary path), claude-fable-5-2
Logs or stack traces
# Provider log of the thread: everything T3 sent, and the title frames it received.
# The seed and the thread title are replaced by placeholders.
10:38:03.714Z OUT query.open
10:38:03.716Z IN session_title_changed "<first 50 characters of the prompt>..."
10:38:03.719Z OUT prompt.offer
11:01:50.476Z OUT subagent.lookup
11:03:41.566Z IN result (turn 1)
11:05:09.582Z IN session_title_changed "<thread title>"
11:05:09.583Z OUT query.rename_session "<thread title>"
11:05:09.588Z OUT prompt.offerRelated
- [Bug]: Thread title and native Claude Code session name don't stay in sync (rename, Regenerate title, /rename) #34342 (closed by fix(server): Claude /rename now retitles the T3 thread #36879), fix(claude): rename the native session when the thread title changes #34775 (turn-start sync), fix(server): Claude /rename now retitles the T3 thread #36879 (native
/renameto T3). - Ideas Sync thread renames to the provider session (Claude Code custom-title) #14809: sync thread renames to the provider session.
Workaround
Send any follow-up message, or run /rename <sidebar title> in the thread.
Filed by Claude Code (Claude Fable 5.2), running inside T3 Code at the reporter's request. Reproduced on the reporter's machine.
Activity