Repository navigation
fix(server): import Claude sessions with only shell commands - #42681
StiensWout wants to merge 7 commits into
Conversation
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
The gate requires the repro test file to stay as the test commit left it, so the shell cases stay in their own file. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This reverts commit 45e2d92.
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
T3 Code skipped Claude Code sessions that ran local shell commands without a model reply. The importer now captures the first title-bearing prompt and the first nonblank shell command before limiting message history. Saved titles and prompt-derived titles take precedence, and the shell command can name a shell-only session.
Related: #23727, #41878, #34043, #25923
Reproduction on main
Commit ca81b7b97a (main), in the running web app:
A warning titled Some history was not imported says that one thread could not be imported. The project has no thread for that session, and !pwd is not in any history. Expected: The project has a thread titled !pwd, and opening it shows !pwd in its history.
The cause is at
apps/server/src/project/AgentSessionScanner.ts:745. 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 null to deeply equal { title: '!pwd', texts: [ '!pwd' ] }in the output.Evidence
Environment: Linux x64, the repository's own tests.
Proven: the repro fails at the test commit fcf9d96d32 and passes on the head c1b01235e5, both on main 024da4f7bf.
Outside view: a person sees it in the running web app by following the steps under Reproduction on main.
Tests
pnpm exec vp run check:changed 024da4f7bfa49973baddb35f39aa95f4ec20222cpassed 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