Session transcript forks duplicate ~90% of content — 580 MB accumulated in ~/.claude/projects

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 9, 2026

Environment

  • Claude Code v2.1.222 (some files from v2.1.219 / v2.1.221)
  • Claude Desktop (Code tab), Windows 11 Pro (build 26200)

Summary

Session transcripts fork into new session IDs while carrying near-complete copies of the previous file. Over time this turns one conversation into many nearly-identical .jsonl files, and the on-disk cost is substantial.

Measured on one machine:

| Scope | Files | Size | Duplication |
|---|---|---|---|
| One conversation (single project dir) | 7 | 23.1 MB | 20.7 MB (~90%) is duplicated content |
| ~/.claude/projects/ overall | 156 | 580 MB | 41 project dirs, avg 3.8 files/dir, max 67 files (173.6 MB) |

Message-uuid overlap between paired files is 93–99% (e.g. 695/697 identical).

Why this seems worth tracking separately

The fork behaviour itself is reported from several angles (#82969 /clear, #78264 /resume, #76493 Agent View, #80427 multiple terminals, #77649 reconnect, #25295 VS Code, #31685 web). What does not appear to be reported is the storage consequence: I searched for "transcript disk space", "session files disk usage", "jsonl duplicate size", "projects folder size growing", and "transcript storage bloat", and found no existing issue.

Practical effects:

  1. Disk grows roughly with (conversation length × number of forks), not with actual conversation volume.
  2. cleanupPeriodDays (default 30) deletes per file, so fragments of one long conversation expire piecemeal — leaving holes rather than freeing a whole session (related: #62959, #63904).
  3. Any tooling that counts .jsonl files over-reports session counts.

Suggestions

  • Reference or link forked transcripts instead of copying prior records.
  • If copying is required, deduplicate on write (records already carry stable uuids).
  • Surface transcript storage in /doctor or /context so growth is visible.

Reproduction note

Anyone can check their own machine by comparing message uuids across .jsonl files within one project directory under ~/.claude/projects/.

View original on GitHub ↗