claude-code - 💡(How to fix) Fix [FEATURE] Enterprise usage bar support [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#52838Fetched 2026-04-25 06:19:33
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
1
Author
Participants
Timeline (top)
labeled ×3subscribed ×1

Root Cause

Claude Code displays a Usage bar in its status line, but enterprise account users see -- instead of their actual spend data. This is because Claude Code fetches usage via the Anthropic API key, while enterprise usage limits are tracked through the claude.ai web session (SSO/cookie auth). The two auth paths don't share data, so Claude Code has no way to surface the enterprise spend limit.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

<img width="476" height="110" alt="Image" src="https://github.com/user-attachments/assets/5f9f8154-52a5-4ee3-89bb-e54334306039" />

Claude Code displays a Usage bar in its status line, but enterprise account users see -- instead of their actual spend data. This is because Claude Code fetches usage via the Anthropic API key, while enterprise usage limits are tracked through the claude.ai web session (SSO/cookie auth). The two auth paths don't share data, so Claude Code has no way to surface the enterprise spend limit.

The data is available — the Claude desktop app shows it correctly in Settings → Usage (e.g. "$88.57 of $150.00 · 59% · Resets May 1"). <img width="943" height="195" alt="Image" src="https://github.com/user-attachments/assets/3ec80c9a-aa8b-467d-87e3-b840963e937a" />

Enterprise users are left with no way to monitor their spend from within their primary dev workflow, and must context-switch to the desktop app to check it manually.

Proposed Solution

  1. Expose an enterprise usage endpoint accessible via API key. Add a /v1/usage (or /v1/organizations/{id}/usage) endpoint that returns current spend, limit, and reset date for enterprise accounts, authenticatable with the same API key Claude Code already uses. Claude Code can then poll it and render the usage bar identically to how it works for non-enterprise accounts.

Alternative Solutions

  1. Let users configure a session token for usage fetching. Add an optional config field (e.g. usageSessionToken) that Claude Code can use to query the claude.ai usage API separately from the API key used for inference. This keeps inference auth unchanged while allowing usage data to flow through.

  2. Surface the data already available in the desktop app. If the desktop app already caches or fetches enterprise usage locally, expose it via a local IPC or file so Claude Code (running on the same machine) can read it without any new network auth.

Any of these would close the gap. Option 1 proposed above seems like the cleanest long-term fix.

Priority

High - Significant impact on productivity

Feature Category

CLI commands and flags

Use Case Example

I'm working on something in Claude Code CLI and I can see where my current Enterprise usage is, rather than guessing, or having to cross check and context switch with the desktop or web app, open settings -> usage page.

Additional Context

No response

extent analysis

TL;DR

Exposing an enterprise usage endpoint accessible via API key is the most likely fix to display accurate spend data for enterprise account users in Claude Code.

Guidance

  • The proposed solution to add a /v1/usage endpoint for enterprise accounts seems like the cleanest long-term fix, as it would allow Claude Code to fetch usage data using the existing API key.
  • To verify the fix, test the new endpoint with an enterprise account and ensure that the usage bar in Claude Code displays the correct spend data.
  • Consider implementing one of the alternative solutions, such as letting users configure a session token for usage fetching, if exposing a new endpoint is not feasible.
  • Before implementing any solution, ensure that the necessary authentication and authorization mechanisms are in place to secure the usage data.

Example

No code snippet is provided as the issue does not contain specific code details.

Notes

The solution may require additional development and testing to ensure that the new endpoint or alternative solution works correctly and securely.

Recommendation

Apply the proposed solution to expose an enterprise usage endpoint accessible via API key, as it seems like the most straightforward and effective way to fix the issue. This approach would allow Claude Code to display accurate spend data for enterprise account users without requiring significant changes to the existing authentication flow.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [FEATURE] Enterprise usage bar support [1 participants]