[BUG] --resume crashes on sessions where logicalParentUuid points to deleted parent session

Resolved 💬 3 comments Opened Mar 27, 2026 by NadinMerali Closed Mar 31, 2026

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?

When --resume is used to select a session that was auto-compacted (ran out of context), Claude Code crashes if the original pre-compaction session file no longer exists.

Auto-compacted sessions contain a compact_boundary system message with a logicalParentUuid field pointing to the original session JSONL file. If that file has been deleted or cleaned up, attempting to resume the compacted session causes an immediate crash — even though the compacted session file itself is valid and contains a full conversation summary.

What Should Happen?

Claude Code should resume using the compact summary already present in the session file, without requiring the original parent session to exist. If the parent is missing, it should gracefully fall back to the compacted content rather than crashing.

Steps to Reproduce

  1. Have a long session that auto-compacts (hits context limit) — a compact_boundary system message is written with a logicalParentUuid
  2. The original parent session file gets deleted or cleaned up (or simply isn't present)
  3. Run claude --resume and select the compacted session
  4. Claude Code crashes immediately

Environment

  • Claude Code version: 2.1.84
  • OS: Windows 11 ARM64 (win32-arm64)
  • Shell: bash

Additional Context

Inspected session JSONL files directly. Multiple sessions in the same project are affected — all are valid JSON with no data corruption, but each has a logicalParentUuid in the compact_boundary message pointing to a session file that no longer exists on disk. The sessions that have no missing parent references resume without issue.

Example compact_boundary entry in affected session:

{
  "type": "system",
  "subtype": "compact_boundary",
  "logicalParentUuid": "91808e65-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  ...
}

The referenced session file 91808e65-....jsonl does not exist, causing the crash.

View original on GitHub ↗

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