claude --resume hangs on large session files; Ctrl+C does not interrupt
Summary
claude --resume hangs indefinitely when the selected session .jsonl is large or contains very long individual lines. The process stays alive at low CPU (~1–2%) with no progress, and Ctrl+C (SIGINT) does not interrupt it — kill -9 is required to recover.
Closed issues #22204 and #21067 describe the resume hang, but it still reproduces on the current version, and the signal-handling aspect (unresponsive to Ctrl+C) is not covered by either.
Environment
- Claude Code:
2.1.119 - OS: macOS (Darwin 25.4.0)
Reproduction
A typical affected session directory contained multiple large .jsonl files, with a distribution roughly like:
| Size | Lines | Max single line |
|-------|-------|-----------------|
| 16 MB | 2023 | ~375 KB |
| 12 MB | 1541 | ~432 KB |
| 11 MB | 3032 | ~163 KB |
| 6.8 MB| 1013 | ~168 KB |
Steps:
claude --resume- Select one of the larger sessions from the picker.
- The CLI hangs — cursor stays, no UI renders, low CPU.
- Ctrl+C has no effect. Ctrl+\\ has no effect.
- Only
kill -9 <pid>terminates the process.
This matches the failure mode described in #21067 (very long single lines stalling deserialization) and #22204 (large total session size).
Expected behavior
- Resume completes in reasonable time, or fails fast with a clear error when the session is too large / malformed.
- Ctrl+C always interrupts the process, even during long synchronous work.
Suggested directions
- Lazy / streaming parse of the session
.jsonlrather than loading and deserializing the entire file synchronously before rendering. - Hard cap on individual line size with truncation and a visible warning, so one oversized tool result doesn't wedge the whole session.
- Keep SIGINT responsive during session load — e.g. do the heavy parse off the main event loop, or yield periodically, so the signal handler can run and exit cleanly.
- A
--debugor progress indicator during resume would make it obvious whether the process is stuck vs. slowly working.
Workaround
For anyone hitting this:
kill -9the hung process.- Use
claude --continueinstead of--resume(picks up the most recent session via a different path). - Move the largest
.jsonlfiles out of~/.claude/projects/<proj>/into an archive dir to prevent the picker / resume from touching them.
Related: #22204, #21067.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗