[BUG] bash_progress events not compacted, causing multi-MB transcripts and resume hang
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Preflight Checklist
- I have searched existing issues (related: #16251, #14472, but distinct root cause)
What's Wrong?
Session transcripts become bloated with bash_progress events from long-running commands, causing session resume to hang.
When a Bash command runs for an extended period, Claude Code records a progress event to the session transcript every second. After a 2-hour session, the transcript reached 31MB
with 85% being progress updates. Attempting to resume causes the UI to hang indefinitely.
Evidence
$ ls -lh ~/.claude/projects/-workspace/<session-id>.jsonl
31M
$ wc -l ~/.claude/projects/-workspace/<session-id>.jsonl
6204 lines
$ grep -c '"type":"progress"' ~/.claude/projects/-workspace/<session-id>.jsonl
5275 lines # 85% of transcript
Each progress event looks like:
{"type":"progress","data":{"type":"bash_progress","output":"","elapsedTimeSeconds":142,...}}
Relationship to Existing Issues
- Different from #16251: That's about large single entries (100KB+ Read results). This is about thousands of small (~500 byte) progress events.
- Different from #14472: That's about context token limits. This is about transcript file bloat before even reaching the model.
What Should Happen?
Progress events should not be persisted to the transcript (they're transient UI state), or should be compacted on session end.
Error Messages/Logs
Steps to Reproduce
- Start a Claude Code session
- Run a long-running bash command (30+ minutes)
- Exit and try to resume
Expected: Session resumes normally
Actual: UI hangs while loading the bloated transcript
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.12 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Terminal.app (macOS)
Additional Information
I'm running Claude code in the sandboxed environment (Linux Docker on Mac Os X)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗