Session resume freezes with 100% CPU due to redundant progress events in session files
Status Closed — not planned
Reported on v2.1.27
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 9 comments · opened Jan 31, 2026 · closed Mar 11, 2026
Describe the bug
Claude Code freezes with 100% CPU when attempting to resume conversations. The UI becomes unresponsive and the process must be killed.
Root Cause Analysis
Investigation revealed that session .jsonl files grow to hundreds of megabytes due to progress events storing the entire conversation history in normalizedMessages on every event.
Evidence from a 193MB session file:
- 500 lines total
- 426
progressevents = 191.6 MB (99.9% of file) - Actual conversation (user/assistant/system) = 0.16 MB
- Each progress event contains full
normalizedMessagesarray (2264 messages in longest case) - Individual lines up to 1.4 MB each
The duplication pattern:
Early events: progress with ~140 messages → 0.72 MB
Middle events: progress with ~500 messages → 0.85 MB
Late events: progress with ~2264 messages → 1.44 MB
Every progress event duplicates the entire conversation history up to that point.
Impact
- Session files grow to 100MB-400MB for long conversations
- Resume picker must parse all these files → 100% CPU freeze
- Storage waste: 99.9% of session files is redundant data
Expected behavior
progress events should either:
- Not include
normalizedMessages(it's redundant - the conversation is already stored in user/assistant events) - Store only a delta/reference
- Be excluded from session files entirely (they're only needed for live streaming UI)
Workaround
Strip progress events from session files:
import json
def clean_session(filepath):
with open(filepath) as f:
lines = [l for l in f if json.loads(l).get('type') != 'progress']
with open(filepath, 'w') as f:
f.writelines(lines)
Environment
- Claude Code version: 2.1.27
- OS: Linux
This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗