Repository navigation
Conversation
"Resume in New Native Chat" opened chats named "Claude Chat" or "Codex Chat", and first-message naming never fires for them because their journal already holds the imported history. When a create adopts an existing conversation, look up the title Session History shows for it and seed it as the new record's conversationName. The lookup is best-effort: a failure or History's placeholder title leaves the chat with the default name, as before. Fixes stablyai#28763 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to
|
ELI5
When you pick a past Claude or Codex conversation in Session History and choose "Resume in New Native Chat", the new chat should carry that conversation's name. Today it is always called "Claude Chat" (or "Codex Chat"), so several resumed chats look identical. With this change the chat starts with the same name Session History showed for the conversation.
What Changed
Before: a chat opened with "Resume in New Native Chat" (Session History row menu, tab menu, or the terminal header button) is named "Claude Chat" / "Codex Chat" and stays that way. First-message naming (#25724) never fires for it, because its journal already holds the imported history.
After: the chat is named after the conversation's Session History title from the moment it opens, in the tab, the sidebar row and Session History. A manual tab rename still wins.
Mechanism: when a create adopts an existing conversation,
resolveStructuredAgentSessionIntentalready knows the transcript path. It now looks up that conversation's title with the existingresolveLocalAiVaultSessionTitlesand carries it onadopt.conversationName.reserveRequestForpasses it to the reserve request, andagentSessionRecordIdentityFieldsnormalises it and writes it as the new record'sconversationName, on both the founding and the reservation path. Everything downstream already reads that field (#25986), and the first-message namer already skips a record that has a name.The lookup is best-effort. Claude and Codex only (the agents Session History titles). History's
<Agent> <id prefix>placeholder is never used as a name. If the lookup fails or times out, the chat opens with the default name, exactly as today.Why
The name has to be on the host record: a label set by the renderer would be overwritten by the host-published tab title and would not reach the sidebar or Session History.
Alternatives considered:
resumeFrom. The renderer has it, butagentSession.createparams are strict, so an older host would reject the new field, and the row title can still be a pending placeholder. Deriving it host-side needs no wire change.Linked Issue
Fixes #28763
Visual Proof
Before: as described in #28763 (resumed chats all read "Claude Chat").
After: not captured. I could not run the Electron app locally (dependencies installed without native builds), so the behaviour is covered by the host-level tests below instead.
Testing
On macOS, Node 22.22, dependencies installed with
--ignore-scripts:vitest run --config config/vitest.config.tsonorca-runtime-structured-agent-session-create-intent.test.ts,structured-agent-session-create-adoption.test.tsandstructured-chat-naming.test.ts: 73 passed.expected undefined to be 'Fix the flaky login test'), so they guard the fix.pnpm tc:node: clean.oxlintandoxfmt --checkon the changed files: clean.New tests:
an adopting create stores the source conversation's (normalised) title as the record's
conversationName;the create intent carries the title, skips History's placeholder title, and still adopts with no name when the title lookup fails.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Investigation, implementation and tests were done with Claude Code: Claude Opus 5.5 planning and reviewing, with Claude Sonnet 5.5 subagents for code reading, implementation and test runs.
Review
AI review summary:
transcriptNotFoundotherwise). So a remote host names the chat from its own transcript.adoptis built host-side and never crosses the wire (the client's attach params have noadopt), so mixed client and host versions are unaffected. The new fields are optional, and existing records are untouched.normalizeAgentSessionConversationName(control and bidi characters stripped, 200-character cap) before it is stored.Agent skill upstream boundary
Notes
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)🤖 Generated with Claude Code