Summary
--continue (bare) and --continue <explicit-session-id> both crash with Cannot discover continue targets ... Invalid session_start: missing or malformed required fields when ANY single session recording in the project's chats dir has a malformed session_start record. One corrupt file (in this case a session-2026-09-17T20-08-46-*.jsonl left behind by a crashed/killed session) blocks resuming EVERY session in that project, including by explicit id where discovery of other candidates is unnecessary.
Repro (observed 2026-09-18, branch-5 working tree at ~ea297be0c + issue3663 changes)
- Have ≥1 valid session and ≥1 session file whose first record is not a well-formed
session_start (observed after a hard-killed session from 2026-09-17).
- Run
bun scripts/start.ts --continue <valid-session-id> --prompt ....
- Crash before the request is sent:
Error: Cannot discover continue targets: /Users/acoliver/Library/Logs/llxprt-code/tmp/<project-hash>/chats/session-2026-09-17T20-08-46-*.jsonl: Invalid session_start: missing or malformed required fields
at listContinueTargets (packages/core/src/recording/SessionDiscovery.ts:149:17)
Impact
--continue <id>: the explicit id makes scanning other candidates unnecessary, but the scan still throws, so explicit resume is impossible until the corrupt file is manually removed.
- Bare
--continue: same total failure; a single unreadable file should not hide all healthy sessions.
Expected behavior
--continue <id> should resolve the explicit id without requiring every other file to parse (or at worst skip unreadable candidates).
- Discovery should treat an unparseable/malformed session file as a non-candidate (skip with a debug log) rather than throwing for the whole listing. These are local tmp recordings; one damaged file (crash, disk-full, partial write) should not remove the resume feature for the project.
Environment
- llxprt-code working tree (branch-5, issue3663 branch), macOS, sessions under
~/Library/Logs/llxprt-code/tmp/<hash>/chats/.
Workaround used
Moved the corrupt file out of the chats dir into a quarantine folder; resume works again.
Summary
--continue(bare) and--continue <explicit-session-id>both crash withCannot discover continue targets ... Invalid session_start: missing or malformed required fieldswhen ANY single session recording in the project's chats dir has a malformedsession_startrecord. One corrupt file (in this case asession-2026-09-17T20-08-46-*.jsonlleft behind by a crashed/killed session) blocks resuming EVERY session in that project, including by explicit id where discovery of other candidates is unnecessary.Repro (observed 2026-09-18, branch-5 working tree at ~ea297be0c + issue3663 changes)
session_start(observed after a hard-killed session from 2026-09-17).bun scripts/start.ts --continue <valid-session-id> --prompt ....Impact
--continue <id>: the explicit id makes scanning other candidates unnecessary, but the scan still throws, so explicit resume is impossible until the corrupt file is manually removed.--continue: same total failure; a single unreadable file should not hide all healthy sessions.Expected behavior
--continue <id>should resolve the explicit id without requiring every other file to parse (or at worst skip unreadable candidates).Environment
~/Library/Logs/llxprt-code/tmp/<hash>/chats/.Workaround used
Moved the corrupt file out of the chats dir into a quarantine folder; resume works again.