Skip to content

Session JSONL files grow to multi-GB size due to bloated "progress" entries #18905

Closed as not planned

Description

@carsonscheidel

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Session JSONL files can grow to extreme sizes (5+ GB) due to progress type entries accumulating large amounts of duplicated data.

In my case, a session file grew to 5.27 GB with 1,739 "progress" entries averaging ~3 MB each. The actual conversation (user/assistant messages) was only 0.67 MB.

This caused:

  • Session disappeared from Past Conversations
  • Claude Code became unresponsive
  • ~5 GB of unexpected disk usage

What Should Happen?

Progress entries should be lightweight streaming updates, not accumulate the full conversation context repeatedly. A typical session should remain under 10 MB.

Error Messages/Logs

No explicit error - the session simply stopped appearing in Past Conversations.

File analysis showed:
| Message Type | Count | Size |
|--------------|-------|------|
| progress | 1,739 | 5,396 MB (99.6%) |
| user | 56 | 0.39 MB |
| assistant | 110 | 0.25 MB |

Steps to Reproduce

  1. Start a conversation using multiple sub-agents via the Task tool (e.g., AWS Infrastructure agent + Datadog agent in parallel)
  2. Have a lengthy back-and-forth troubleshooting session
  3. Check session file size in: ~/.claude/projects//
  4. Observe progress entries growing to MB+ sizes each

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.9

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

Workaround: Filtering out "progress" type entries from the JSONL file restored functionality:

  • Before: 5.27 GB (1,927 lines)
  • After: 0.67 MB (188 lines)

The session involved parallel Task tool calls with sub-agents investigating a performance issue. This may be related to how agent progress is logged/accumulated.

Possibly related to #9890, #10107, #10505 - but those focus on FileHistory/.claude.json while this bug is specifically about "progress" type entries in session JSONL files accumulating context.

Activity

  1. github-actions commented on Jan 18, 2026

    @github-actions

    Found 2 possible duplicate issues:

    1. [BUG] Subagent search on ~/.claude causes multi-GB log bloat and /resume crash #18682
    2. [BUG] FileHistory bug: 4.2GB crash from parallel agents (Jan 2026) #18687

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. kylesnowschwartz commented on Jan 21, 2026

    @kylesnowschwartz

    Hit this on macOS with v2.1.12. Session reached 4.3GB - 3.4GB main transcript + 860MB subagent log. 105 lines in the JSONL, with individual progress entries reaching 934 million characters (~900MB each). Trace trap on startup until I moved the session out of ~/.claude/projects/.

  3. junaidtitan commented on Feb 10, 2026

    @junaidtitan

    Had the same issue — session files ballooning to multi-GB from progress tick entries. In my case it was thousands of progress entries averaging ~3MB each while the actual conversation was under 1MB. Pure bloat.

    Built Cozempic to deal with this. The progress-collapse strategy targets exactly this — it collapses consecutive progress tick messages down to a single representative entry. On sessions like yours this alone can reclaim 40-50% of file size.

    pip install cozempic
    cozempic init

    cozempic init wires a guard daemon that auto-starts on every session and continuously prunes this bloat before it accumulates. You can also treat an existing bloated session:

    # See where the bloat is
    cozempic diagnose current
    
    # Dry-run to preview savings
    cozempic treat current -rx aggressive
    
    # Apply
    cozempic treat current -rx aggressive --execute

    Would really appreciate if you could test this on one of your bloated sessions and let me know if it helps. If progress-collapse doesn't catch all the patterns in your case, I'd like to investigate further and add additional fixes.

  4. github-actions commented on Mar 11, 2026

    @github-actions

    Closing for now — inactive for too long. Please open a new issue if this is still relevant.

  5. github-actions commented on Mar 19, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  6. locked as resolved and limited conversation to collaborators on Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions