Conversation history JSONL files silently lost while file-history backups survive

Resolved 💬 3 comments Opened Mar 1, 2026 by JPHutchins Closed Mar 5, 2026

Description

Multiple conversation sessions have their JSONL conversation logs either never written or silently deleted, while the corresponding ~/.claude/file-history/<session-id>/ directories contain file edit backups proving the sessions were active and productive. This means the conversation text (user messages, assistant responses, reasoning) is permanently lost, even though the code changes survive as file-history snapshots.

Impact

At least one of the affected sessions was a large, multi-week conversation (Feb 7 – Feb 28) that touched multiple source files across many editing rounds. The conversation content — decisions, reasoning, context — is unrecoverable.

Reproduction

Discovered by inspecting ~/.claude/file-history/ and ~/.claude/projects/<project>/*.jsonl. Sessions in file-history that have no corresponding JSONL file in the projects directory are orphaned.

Evidence

Orphaned sessions (file-history exists, no JSONL conversation log)

| Session ID | File-history time range | File versions | Backup size |
|---|---|---|---|
| 76e23499-399b-438b-ae82-813d13bd0ce5 | 2026-02-07 → 2026-02-28 | 19 | 463 KB |
| 84caa93b-bd3f-4343-96b8-d86154531d50 | 2026-02-28 → 2026-03-01 | 7 | 146 KB |
| e9c6c77b-bf02-454b-9104-ddf6036830d1 | 2026-02-28 → 2026-03-01 | 9 | 246 KB |
| 058f6137-0481-4eda-a300-8a8a17bdbe09 | 2026-03-01 11:40 → 12:13 | 23 | 223 KB |
| 9bc799ff-dbdb-41ae-ae89-213d97591c26 | 2026-03-01 11:40 → 12:13 | 23 | 223 KB |
| 26c3c78b-b6d3-44a3-832f-194a1248052a | 2026-02-07 20:58 → 21:09 | 5 | 99 KB |
| d72fe154-f6f4-4e09-aa1a-6efc7f0c5f4b | 2026-02-07 20:58 → 21:09 | 5 | 99 KB |

Sessions with JSONL file present but containing zero user messages

| Session ID | JSONL size | File-history versions |
|---|---|---|
| 43ad08df-314f-466a-8707-7cb6bca48adb | 1.5 KB | 7 |
| a0214de7-b899-45e2-87ed-32fae47ebb67 | 1.5 KB | 7 |
| ef5ec67b-837f-428c-a424-58a12f648851 | 1.6 KB | 0 |

The JSONL files in the second category contain only file-history-snapshot metadata entries — no type: "user" or type: "assistant" message entries at all.

Files modified in the largest orphaned session (76e23499)

The session actively edited these files across 19 versioned backups:

  • src/mahonia/python_func.py (4 versions)
  • src/mahonia/__init__.py (4 versions)
  • src/mahonia/tolerance.py (2 versions)
  • tests/test_python_func.py (2 versions)
  • tests/test_calibration_pipeline.py (2 versions)
  • tests/test_manufacturing_qc.py (1 version)
  • Claude plan files (3 versions)
  • memory/MEMORY.md (1 version)

Notable patterns

  • Sessions 058f6137 and 9bc799ff have identical file-history content (same files, same timestamps, same sizes) — suggesting a possible session ID duplication or fork issue.
  • Sessions 26c3c78b and d72fe154 are also identical to each other.
  • Session 76e23499 spans 3 weeks, indicating a long-lived --continue/--resume session.

Environment

  • Claude Code version: 2.1.63
  • Platform: WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2)
  • Sessions spanned versions 2.1.19 through 2.1.63 based on JSONL version fields in surviving sessions

Expected behavior

All conversation JSONL files should persist for the lifetime of the session data. If file-history backups are written for a session, the conversation log should also be written and retained.

Actual behavior

Conversation JSONL files are silently missing for multiple sessions. The file-history backups survive, proving the sessions were real and active.

View original on GitHub ↗

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