[BUG] Session resume hangs due to progress entry bloat from subagents

Resolved 💬 3 comments Opened Jan 21, 2026 by leezenn Closed Jan 21, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

Session with heavy subagent usage becomes unrecoverable. Attempting to restore or continue the conversation causes Claude Code to hang with high CPU usage. The session file grew to 270MB due to redundant data in progress entries.

Related: #19199 covers bash_progress bloat (many small events). This issue covers subagent progress bloat (fewer but much larger events due to embedded normalizedMessages).

What Should Happen?

Session should remain recoverable regardless of subagent usage. Progress entries should not cause O(n²) file growth.

Error Messages/Logs

No error - terminal goes blank, then hangs indefinitely with high CPU. Process persists even after killing terminal.

Steps to Reproduce

  1. Multi-turn conversation with subagents via Task tool (e.g., parallel haiku agents)
  2. Session uses compaction during the conversation
  3. Press ESC ESC to open session picker
  4. Select the session, choose "Restore conversation without code"
  5. Terminal goes blank - everything disappears
  6. Kill the terminal - process remains running
  7. New terminal with claude -c also hangs

Root cause analysis:
Session JSONL files contain type: "progress" entries for subagent streaming. Each entry embeds the full normalizedMessages array:

  • 72 user-visible messages
  • 23 subagents spawned
  • 3,540 progress entries logged
  • Each late-session entry: ~1MB (full conversation state)
  • Session file: 270MB (250MB from progress alone)

Claude Model

Opus (main) + Haiku (subagents)

Is this a regression?

I don't know

Claude Code Version

2.1.14 (Claude Code)

Platform

Other (Claude Code Max subscription)

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

Suggested fix: Progress entries should either:

  1. Not include normalizedMessages (derive from message history if needed)
  2. Store incremental updates only (delta, not full history)
  3. Compress or deduplicate repeated state

View original on GitHub ↗

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