Compaction hangs/fails to recover session when session log is extremely large (~775MB, 190k lines)

Status Open
Reported on v2.1.227
Maintainer reply None cached
Activity 0 comments · opened Aug 13, 2026

Description:
Long-running session accumulated to 775MB / 190,541 JSONL lines (heavy tool use: SQL queries via SSH, PowerShell scripts, large tool outputs over many days of work). When triggering /compact, the compaction process appeared to hang indefinitely and never completed — on reopening, the session did not recover/resume with a summary as expected.

Environment:

  • Claude Code version: 2.1.227
  • Entrypoint: claude-vscode (VSCode extension)
  • OS: Windows 10 Pro 10.0.19045
  • Session file size: ~775 MB / 190,541 lines

Repro (approximate):
Very long session with many high-output tool calls (large SQL queries, long scripts) accumulated over several days without compacting → eventually triggering /compact hangs / fails to recover the session afterward.

View original on GitHub ↗