Repository navigation
fix(server): keep the first request title in long Claude imports - #42679
StiensWout wants to merge 4 commits into
Conversation
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
…changed The fold already supplies the first request title, so the retainMessage rewrite and the dropped titleText argument were not needed. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Thanks for this. #42681 makes the same change and is the one being kept. #42681 also captures the first usable prompt before trimming Claude history, covering this fallback-title case. It additionally handles shell-only sessions and tests prompt-title preservation beyond the retained history, so it is the more complete change to keep. Your explicit copy of the shortened title remains useful: it prevents a discarded prompt's backing string from staying in memory. That safeguard could be carried into the kept PR. Closing as a duplicate. |
Long Claude sessions without a usable saved title could be imported under a later topic when they opened with a bare command. The importer now captures the first usable request before trimming the message history. It stores a copy of the shortened title so that the title cannot keep an otherwise discarded prompt in memory.
Related: #41878, #25923
Reproduction on main
Commit ca81b7b97a (main). The title comes from a later request about deployment checks. Expected: The imported thread is titled after the first request about the login redirect.
The cause is at
apps/server/src/project/AgentSessionScanner.ts:812. Rancd apps/server && pnpm exec vp test run src/project/AgentSessionScanner.test.tswith the repro test added: it failed in 2 of 2 runs on a clean checkout, withexpected 'Review deployment check 1' to be 'Fix the login redirect' // Object.is equalityin the output.Evidence
Environment: Linux x64, the repository's own tests.
Proven: the repro fails at the test commit 97c4f55bcf and passes on the head c661896cdf, both on main d8354f83e4.
Outside view: not shown in the running app. It fails the rule that the app gets there by itself. The later topic becomes the title only when the session has no usable saved title, a state the repro builds by writing the transcript without one; a person who starts Claude with a bare command, sends the login-redirect request, and continues for more than 200 messages leaves a saved title, and the imported thread shows that title.
Tests
pnpm exec vp run check:changed d8354f83e4ea21edcf40f36eef67266e7c77da71passed on head.Not in this change
Who did the work
Made in T3 Code by GPT 6.2 Sol, Claude Opus 5.5, Grok 4.7 and Gemini 4 Neon