[BUG] Compacted context isn't saved if I exit immediately after compacting
Resolved 💬 2 comments Opened Jan 31, 2026 by JJC1138 Closed Feb 1, 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?
I compacted a full context, then exited Claude Code, then resumed the session, and the context was full again as if it hadn't been compacted.
What Should Happen?
The compacted context should be saved even if Claude Code is exited immediately afterwards.
Error Messages/Logs
Steps to Reproduce
- Resume a session with a significant amount of the context window used.
- Run
/compactand wait for that to complete normally. - Exit Claude Code (I use Ctrl-D x 2 in case that's important).
- Resume session with
claude --resume. - Run
/contextand see that the context is still as full as it was before the compaction.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.29 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗