claude --resume hangs on large session files; Ctrl+C does not interrupt

Resolved 💬 4 comments Opened Apr 24, 2026 by dashesy Closed May 28, 2026

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 itkill -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:

  1. claude --resume
  2. Select one of the larger sessions from the picker.
  3. The CLI hangs — cursor stays, no UI renders, low CPU.
  4. Ctrl+C has no effect. Ctrl+\\ has no effect.
  5. 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

  1. Lazy / streaming parse of the session .jsonl rather than loading and deserializing the entire file synchronously before rendering.
  2. Hard cap on individual line size with truncation and a visible warning, so one oversized tool result doesn't wedge the whole session.
  3. 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.
  4. A --debug or progress indicator during resume would make it obvious whether the process is stuck vs. slowly working.

Workaround

For anyone hitting this:

  • kill -9 the hung process.
  • Use claude --continue instead of --resume (picks up the most recent session via a different path).
  • Move the largest .jsonl files out of ~/.claude/projects/<proj>/ into an archive dir to prevent the picker / resume from touching them.

Related: #22204, #21067.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗