[BUG] Session context truncated at version boundary after /exit when reopening in 2.1.85
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?
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.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗