[BUG] Statusline doesn't refresh after /compact
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?
Statusline continues showing pre-compact context_window values (or resets to blank/0.0k, depending on the statusline script) after running /compact. /compact completion itself doesn't trigger a refresh.
Referenced in https://github.com/anthropics/claude-code/issues/35816 which was closed for inactivity.
What Should Happen?
The statusline should show an updated context usage number after compacting.
Error Messages/Logs
Steps to Reproduce
- Configure a custom statusline that displays context_window.used_percentage
- Build up context usage in a session
- Run /compact
- Observe the statusline — it still shows the pre-compact value until the next prompt/assistant turn
Claude Model
Not sure / Multiple models
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.232
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
This has been reported repeatedly and auto-closed as duplicates each time, but the underlying gap was never fixed. The canonical thread (#35816) is now locked due to inactivity, so filing fresh per its own auto-lock instructions. Related: #35816, #57541, #50688, #19669, #29651, #58268.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗