Statusline token counter doesn't reset on /clear — misleading after first clear

Resolved 💬 3 comments Opened Apr 6, 2026 by camacho Closed Apr 10, 2026

Problem

The statusline token counter tracks cumulative session usage (across the entire CLI process). When a user runs /clear, the conversation context resets but the token counter does not. After the first /clear, the counter no longer reflects the current conversation's token usage.

Why it matters

Users rely on the token count to:

  1. Judge context pressure — deciding when to compact, delegate to subagents, or clear
  2. Evaluate cost/benefit — understanding whether a subagent call or exploration was worth the tokens
  3. Decide when to /clear — but after the first clear, the counter is a running total with no way to separate current vs previous conversation usage

After /clear, a counter showing 200K when actual context is 15K is actively misleading for these decisions.

Suggested fix

Either:

  • Reset the counter on /clear (simplest, matches user mental model)
  • Show both: session total and since-last-clear (e.g., 15K / 200K tokens)
  • Show context size instead of or alongside cumulative tokens (what the user actually needs for decision-making)

Environment

  • Claude Code CLI (macOS)
  • Observed with statusline enabled

View original on GitHub ↗

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