claude-code - 💡(How to fix) Fix [BUG] Usage counter desync after switching between API key and subscription OAuth auth [1 comments, 2 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#45068Fetched 2026-04-09 08:14:02
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×2commented ×1renamed ×1unlabeled ×1

Error Message

Error Messages/Logs

No explicit error messages. Just abnormally fast usage drain visible in the session counter

Code Example

No explicit error messages. Just abnormally fast usage drain visible in the session counter
RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

After switching from subscription OAuth to API key auth, then back to subscription OAuth, the usage counter became permanently desynced. Simple messages consume 1-3% of the session limit. Logging into Claude Code consumed 2% instantly. Issue persists across full uninstall/reinstall and wiping all local config files. Affects both Claude Code CLI and the Claude.ai mobile app.

What Should Happen?

Normal usage consumption — simple messages should use a fraction of a percent at most

Error Messages/Logs

No explicit error messages. Just abnormally fast usage drain visible in the session counter

Steps to Reproduce

1.	Use Claude Code with subscription OAuth
2.	Hit weekly limit, switch to API key auth to continue working
3.	Weekly limit resets, switch back to subscription OAuth
4.	Usage counter is now desynced — burns 1-3% per simple interaction​​​​​​​​​​​​​​​​

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.96

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

This appears to be an account-level server-side bug, not a local config issue, as it persists across devices and full reinstalls. Plan is Claude Pro

extent analysis

TL;DR

Switching back to API key auth and then reverting to subscription OAuth again may temporarily resolve the desynced usage counter issue.

Guidance

  • Verify the issue by checking the usage counter after switching back to API key auth and then reverting to subscription OAuth.
  • Try resetting the usage counter by contacting support or checking the Anthropics API documentation for any available reset options.
  • Test the usage consumption with simple messages after the potential reset to ensure it returns to normal.
  • Consider reaching out to the Anthropics support team to report the issue and request assistance, as it appears to be an account-level server-side bug.

Example

No code snippet is provided as the issue seems to be related to the Anthropics API and account configuration rather than a specific code problem.

Notes

The provided information suggests that the issue is related to the authentication method switching and the usage counter desync. However, without further details on the API or the specific implementation, it's challenging to provide a definitive solution.

Recommendation

Apply workaround: Given the information provided, switching back to API key auth and then reverting to subscription OAuth again may temporarily resolve the issue, but it's recommended to contact the Anthropics support team for a more permanent solution.

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