Statusline doesn't refresh after /compact command
Resolved 💬 4 comments Opened Jan 12, 2026 by seansu4you87 Closed Jan 15, 2026
Description
After running /compact, the statusline continues showing the pre-compaction context percentage. It only updates after the next assistant response.
Steps to Reproduce
- Configure a custom statusline that displays context usage percentage (via
statusLine.commandin settings) - Have a conversation until context usage is high (e.g., 73%)
- Run
/compactcommand - Observe statusline still shows 73%
- Wait for assistant to respond
- Observe statusline now shows correct lower percentage (e.g., 26%)
Expected Behavior
The statusline should refresh immediately after /compact completes, showing the new (lower) context usage.
Actual Behavior
The statusline shows stale data from before compaction until the next assistant response triggers a refresh.
Environment
- Claude Code CLI
- Custom statusline command that reads
context_window.current_usagefrom stdin JSON
Additional Context
The custom statusline script is working correctly - it displays whatever data Claude Code provides. The issue is that Claude Code doesn't call the statusline command with fresh data after /compact runs.
This likely affects other context-changing commands as well, not just /compact.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗