claude-code - 💡(How to fix) Fix Toolbar shows false '100% extra usage' alert on session start [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#47003Fetched 2026-04-13 05:44:04
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Participants
Timeline (top)
labeled ×5subscribed ×1

Root Cause

Root cause (from binary analysis)

RAW_BUFFERClick to expand / collapse

Bug description

On session start, the toolbar briefly shows a false alert:

You've used 100% of your extra usage · resets [date]

The alert is inaccurate — web dashboard shows correct (non-100%) usage. It disappears after the first real user message.

Root cause (from binary analysis)

Claude Code v2.1.104 runs a startup quota probe during "Starting background startup prefetches":

  1. mG9() calls TY1() — a real API call with {role:"user", content:"quota", max_tokens:1, source:"quota_check"}
  2. Response headers contain anthropic-ratelimit-unified-overage-utilization = 1.0
  3. FU6(headers) processes these → sets ok.utilization = 1.0, ok.rateLimitType = "overage"
  4. Toolbar renders the 100% alert immediately
  5. First real user message → fresh API call → headers reflect actual state → alert clears

The probe appears to return stale/cached rate limit headers that don't match the actual usage state returned by subsequent real API calls.

Steps to reproduce

  1. Use Claude Code until extra usage is near or at 100%
  2. Close the session
  3. Top up or wait for state to normalize (web shows non-100%)
  4. Open a new Claude Code session
  5. Toolbar shows 100% alert immediately
  6. Send any message → alert disappears

Expected behavior

Toolbar should either:

  • Not show the alert until a real message confirms the rate limit state, or
  • Show a "checking..." state while the startup probe is in-flight

Environment

  • Claude Code: 2.1.104
  • OS: macOS Darwin 25.3.0 arm64

Suggested fix

Debounce or suppress the overage alert until at least one real user message confirms the high utilization state. The startup probe result alone should not trigger the display.

extent analysis

TL;DR

Debounce the overage alert display until a real user message confirms the high utilization state to prevent inaccurate alerts.

Guidance

  • Identify the FU6(headers) function and modify it to not update ok.utilization and ok.rateLimitType with stale probe results.
  • Introduce a flag to track whether a real user message has been sent, and only display the overage alert if this flag is set and the utilization is high.
  • Consider adding a "checking..." state to the toolbar while the startup probe is in-flight to improve user experience.
  • Review the API call TY1() and its response handling to ensure that the anthropic-ratelimit-unified-overage-utilization header is correctly interpreted.

Example

let realMessageSent = false;
// ...
// In the real user message handler
realMessageSent = true;
// ...
// In the FU6 function
if (realMessageSent && ok.utilization === 1.0) {
  // Display overage alert
}

Notes

The suggested fix assumes that the FU6 function and the real user message handler are accessible and modifiable. Additionally, the introduction of a "checking..." state may require changes to the toolbar's UI logic.

Recommendation

Apply workaround: Debounce the overage alert display until a real user message confirms the high utilization state, as this approach directly addresses the issue without requiring changes to the underlying API or probe logic.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Toolbar should either:

  • Not show the alert until a real message confirms the rate limit state, or
  • Show a "checking..." state while the startup probe is in-flight

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING