Repository navigation
fix(server): find Claude session directories after large images - #42640
StiensWout wants to merge 8 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>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Drops the separate pending index list; each round walks the scan results and resumes the ones still deferred. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…d422ccc62b8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moves the budget cases into AgentSessionScanner.test.ts on its existing helpers and drops the eight-transcript case, which a sequential reader also passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The automated pipeline stopped on this pull request and will not merge it: the fix is written and reviewed, but proving it needs something no worker has:
It stays open for a person to finish or close. |
Recent Claude sessions could be missing from import when a large inline image pushed the working directory beyond the first 1 MiB of the transcript. The scanner gives every candidate its initial scan, then resumes deferred Claude transcripts in bounded rounds from where it left off. This preserves older sessions found in the initial scan and gives smaller deferred sessions a chance to finish alongside oversized files.
Related: #40549, #23727, #40192, #21598, #27656, #42613, #25923, #34542, #23214
Reproduction on main
Commit 03fa7cfc10 (main). The session is absent from the imported history. Expected: The session imports with the rest of the workspace’s recent Claude history.
The cause is at
apps/server/src/project/AgentSessionScanner.ts:1309. 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 [] to deeply equal [ 'large-image-session' ]in the output.Evidence
Environment: Linux x64, the repository's own tests.
Proven: the repro fails at the test commit 593e9c4c3b and passes on the head 5474f721f5, both on main c925b9ab19.
Outside view: not shown in the running app. It fails “The app gets there by itself.” The session is dropped only when its working directory sits past the first 1 MiB of the session file. The repro builds that by writing the directory after the screenshot. Claude writes the directory before the message, and a first screenshot larger than 1 MiB in that layout is still imported, so sending one never puts the file in the missing state.
Tests
pnpm exec vp run check:changed c925b9ab198099f67de862ed01701bd1d8809f2bpassed 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