Repository navigation
fix(ai-vault): hide Orca's chat-naming requests from Session History - #30029
Conversation
Naming a chat runs a one-shot agent CLI request in the chat's folder, and the CLI saves it beside the user's chats. Session History listed it, and opening it from a phone resumed the naming request instead of the chat. Fixes #29973 Co-Authored-By: Claude <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
To name a new chat, Orca quietly asks the agent CLI for a short title. The CLI saves that small question-and-answer in the same folder as the user's real chats, so Session History showed it as if it were a chat. Tapping it opened the naming request instead of the conversation.
What Changed
isConversationNameRequestSessioncheck reads the session's preview messages and is applied inparseSessionCandidates. Freshly parsed and cached rows both pass through that function, and so do local, runtime-host and in-scope scans. The prompt's first line is now an exported constant (CONVERSATION_NAME_PROMPT_OPENING), so the generator and the filter can't drift apart.Why
Filtering in the scanner hides the transcripts users already have, works with every agent CLI version, and needs no parse-cache schema bump, because it reads fields that cached rows already carry. The alternative is to stop the CLI from saving the run (
--no-session-persistencefor Claude). That would leave existing transcripts listed, and an older CLI that doesn't know the flag would reject it and break chat naming and commit-message generation. A naming transcript the user kept typing into has more than one user turn, so it stays listed.Linked Issue
Fixes #29973
Visual Proof
N/A. Session History list contents, verified over RPC (see Testing).
Testing
Unit tests:
src/main/ai-vault/session-scanner-conversation-name-requests.test.tschecks three cases. The naming request is hidden while the chat stays listed (this failed before the fix: both were listed). A chat that quotes the prompt later stays listed. A naming transcript the user continued stays listed.E2E:
tests/e2e/headless-serve-session-history-naming-requests.spec.tsruns an isolated headless serve and a scripted paired phone callingaiVault.listSessions, with a chat transcript and a naming transcript in the host's Claude project folder. The chat is listed and the naming request is not.Verified live: macOS headless
orca serve(isolated profile and HOME) with the scripted phone. Not verified with a realclaude -pnaming run, because the isolated HOME has no Claude login. The transcript shape follows the issue's evidence. Not verified live on Linux or Windows: the logic is platform-neutral.pnpm tc:node, oxlint and the changed-code quality gate pass.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Codex review (gpt-6.1-sol, high) found that a naming transcript the user later continued would be hidden. Fixed: the transcript must have the naming prompt as its only user turn. The final review found nothing.
Agent skill upstream boundary
Notes
Wire compatibility: this adds no fields. Older phones simply receive one row fewer. SSH and runtime hosts run the same scanner, so they hide these rows as well.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)