Status bar context percentage not reset after plan mode clears context

Resolved 💬 3 comments Opened Jan 22, 2026 by jrkaisersr Closed Jan 26, 2026

Description

The status bar's context/token counter is not being reset when context is cleared after exiting plan mode with "bypass permissions" enabled. This results in the status bar showing incorrect (and impossible) context percentages like 131%.

Steps to Reproduce

  1. Enter plan mode and work through a planning session that accumulates significant context
  2. Exit plan mode with the option that clears context and enables bypass permissions
  3. Observe the status bar - it still shows the pre-clearing token count

Expected Behavior

After context is cleared, the status bar should reset to reflect the actual current context size (which should be much smaller after clearing).

Actual Behavior

The status bar continues to display the cumulative token count from before the context was cleared. In the attached screenshot, it shows:

  • 261,027 tokens (131%) - which is impossible if context was actually cleared
  • "bypass permissions on" is displayed, confirming plan mode exit occurred

Screenshot

The status bar shows 🧠 261,027 (131%) while also showing "bypass permissions on", indicating the context clearing happened but the token counter wasn't reset.

Environment

  • Model: Opus 4.5
  • Platform: macOS (Darwin)

Additional Context

This appears to be a state synchronization issue where the context-clearing operation after plan mode doesn't notify/update the status bar component's token counter.

---
🤖 Generated with Claude Code

View original on GitHub ↗

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