Repository navigation
Description
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?
After ending a session with /exit and reopening Claude Code in 2.1.85, the model's context is truncated at the previous version boundary — it can see messages from the most recent version segment but not from earlier segments. The session JSONL and parentUuid chain are fully intact.
Confirmed with /context: in 2.1.84 the session had 133.9k tokens (67%) of message context. After /exit + reopen in 2.1.85, context dropped to 5.1k tokens (2.5%) — only the 2.1.84 and 2.1.85 messages were visible; all prior history was gone. After downgrading back to 2.1.84, the full context and history became visible again.
The model self-diagnosed: "The previous session's context was not carried over. I only knew what was in the git log shown at conversation start. The autocompact buffer didn't transfer either — this is a fresh session."
What Should Happen?
Reopening a session in 2.1.85 should load the full conversation history from the session JSONL, not just the most recent version segment. The parentUuid chain exists and is intact — it just needs to be traversed fully.
Error Messages/Logs
None - there is simply a lack of context. Diagnosed via /context showing 5.1k tokens vs expected 133.9k tokens.Steps to Reproduce
- Run a long session in version 2.1.81 (or any version before 2.1.84)
- End it with
/exit - Open Claude Code in the same working directory in 2.1.84 — verify with
/contextthat full history is present - End it with
/exit - Update to 2.1.85 and open Claude Code in the same working directory
- Run
/context— context is now near-empty; ask about prior work — model has no knowledge of it
Reproduced in two separate sessions across two projects. Downgrading to 2.1.84 restores full context.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.84
Claude Code Version
2.1.85
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Kitty
Additional Information
Related prior fixes that did not address this case:
- 2.1.83: "Fixed SDK session history loss on resume caused by hook progress/attachment messages forking the parentUuid chain" —
parentUuidchain verified intact in our sessions. - 2.1.83: "Fixed remote sessions forgetting conversation history after a container restart" — applies to remote sessions only.
Activity
github-actions commentedon Mar 27, 2026
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
[-]Session context lost after /exit when reopening in 2.1.85[/-][+][BUG] Session context truncated at version boundary after /exit when reopening in 2.1.85[/+]osipxd commentedon Mar 27, 2026
This issue is reproducible on the different version range.
github-actions commentedon Apr 27, 2026
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
github-actions commentedon May 8, 2026
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.