Statusline should refresh after /compact

Resolved 💬 3 comments Opened Feb 12, 2026 by evgeny-gozentry Closed Feb 16, 2026

Description

The custom statusline command does not refresh after running /compact. The statusline only updates on the next API round-trip (when the user sends a message and Claude responds).

Steps to Reproduce

  1. Configure a custom statusline command in ~/.claude/settings.json
  2. Run a conversation until context usage is high (e.g., 82%)
  3. Run /compact
  4. Observe the statusline still shows the pre-compaction context usage (82%)
  5. Send any message (e.g., "hello")
  6. After Claude responds, the statusline now shows the post-compaction value (e.g., 25%)

Expected Behavior

The statusline should refresh immediately after /compact completes, reflecting the updated context_window.used_percentage and current_usage values without requiring an additional message round-trip.

Why It Matters

The context usage bar is the primary reason users run /compact — they want to see the freed context space immediately. Having to send a throwaway message to see the updated value is a confusing UX gap.

Environment

  • Claude Code CLI
  • Custom statusline via statusLine.type: "command"

View original on GitHub ↗

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