[BUG] /clear accumulates session cost in status line instead of resetting to $0.00

Resolved 💬 4 comments Opened Mar 11, 2026 by AQClubMed Closed Apr 9, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

After running /clear, the session cost displayed in the status line is not reset to zero.
It adds the new session's cost on top of the previous session's cost, resulting in a
permanently incorrect cumulative total for the remainder of the process lifetime.

Example:

  • Session 1 ends at $0.05 → run /clear
  • Session 2 costs $0.02 → status line shows $0.07 instead of $0.02
  • Run /clear again → cost continues to accumulate indefinitely

What Should Happen?

After /clear, the session cost counter should reset to $0.00 and only reflect
the cost incurred since the last clear, matching the behavior of a full restart.

Error Messages/Logs

N/A — no error thrown. The bug is a silent incorrect value in the status line.

Steps to Reproduce

  1. Start a Claude Code session and send several messages until some cost is incurred

(e.g., status line shows $0.05)

  1. Run /clear to reset the conversation context
  2. Send a few messages in the new session (e.g., new session cost = $0.02)
  3. Observe the status line: it displays $0.07 instead of $0.02
  4. Run /clear again to confirm cost keeps accumulating on each clear

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.72 (Claude Code)

Platform

AWS Bedrock

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

Workaround: fully exit Claude Code (/exit or Ctrl+C) and relaunch — this correctly
resets the counter to $0.00.

This appears to be part of a broader pattern of stale data sent to the status line
after session-management commands:

  • #29912 — Status line not refreshed after /new (closed as duplicate — same root cause family)
  • #29651 — Statusline JSON contains stale context_window metrics after compaction
  • #29819 — Status line token count not refreshed after /compact

Root cause hypothesis: Claude Code does not send a reset payload to the status line
after /clear is executed, mirroring the same issue reported for /new.

View original on GitHub ↗

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