Session terminated unexpectedly, losing context and wasting tokens
Resolved 💬 4 comments Opened Mar 14, 2026 by olinaresleon-figma Closed Apr 12, 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?
Description
My Claude Code session ended unexpectedly mid-conversation, causing me to lose all conversation context. When I started a new session, I had
to spend additional tokens just to discover that nothing had been preserved.
Impact
- Lost all conversation context from an active working session
- Wasted tokens attempting to recover state in the new session
- Lost time re-establishing context for ongoing work
Environment
- Model: Claude Opus 4.6 (1M context)
- Platform: macOS (Darwin 25.3.0)
- Shell: zsh
What Should Happen?
Expected behavior
- Sessions should not terminate without clear warning
- If a session must end, context should be preserved or the user should be given the opportunity to save state
- At minimum, a clear explanation of why the session ended should be provided
Error Messages/Logs
Steps to Reproduce
- Launch Claude Code from the VS Code integrated terminal
- Work on a multi-file project with extensive file reads (causal modeling project with 15+ Python scripts, markdown files, and data files)
- Maintain an active session for ~45 minutes with continuous interaction
- Session terminates silently — no error, no warning, no exit code
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.76
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗