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

  1. Configure a custom statusline that displays context usage percentage (via statusLine.command in settings)
  2. Have a conversation until context usage is high (e.g., 73%)
  3. Run /compact command
  4. Observe statusline still shows 73%
  5. Wait for assistant to respond
  6. 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_usage from 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.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗