Session resume freezes when JSONL contains large tool_result (~12MB)
Resolved 💬 2 comments Opened Feb 8, 2026 by tmokmss Closed Feb 8, 2026
Description
When resuming a session whose .jsonl file contains a large tool_result entry, Claude Code freezes/becomes unresponsive.
Reproduction
- In a session, run a command that produces large output (e.g.,
git diffon snapshot files producing ~11.4MB of output) - The tool_result gets stored in the session's
.jsonlfile, making it ~12MB - Try to resume that session (
claude --resume <session-id>) - Claude Code freezes
Details
- The
.jsonlfile was only 19 lines, but line 18 alone was ~12.8 million characters (a singletool_resultcontaining a largegit diffoutput) - The
persisted-outputmechanism correctly saved the full output to an external file (tool-results/toolu_xxx.txt), but the full content also appears to be embedded in the JSONL entry itself - Session file:
387be59b-6574-49d9-b052-36925b2ba8ec.jsonl(~12MB) - Claude Code version: 2.1.37
Expected Behavior
- Session resume should handle large tool_results gracefully without freezing
- If output is already persisted to an external file via
persisted-output, the JSONL entry should reference it rather than duplicating the full content inline
Suggested Improvements
- Truncate or lazy-load large tool_results when resuming a session
- Avoid storing full output in JSONL when it's already saved as a persisted-output file
- Add a size threshold for tool_results stored inline in the JSONL
Environment
- macOS (Darwin 25.2.0)
- Claude Code v2.1.37
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗