claude-code - 💡(How to fix) Fix [Bug] Extra usage consumed before regular usage limits reached [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#52244Fetched 2026-04-24 06:12:21
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×4cross-referenced ×1

Error Message

[ { "error": "Error: Failed to delete keychain entry\n at _2q (file:///Users/davidcondrey/.nvm/versions/node/v24.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:297:269834)\n at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n at async Gmq (file:///Users/davidcondrey/.nvm/versions/node/v24.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:476:889)\n at async TE1 (file:///Users/davidcondrey/.nvm/versions/node/v24.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:476:787)\n at async n88 (file:///Users/davidcondrey/.nvm/versions/node/v24.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2124:2115)\n at async WH6 (file:///Users/davidcondrey/.nvm/versions/node/v24.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2149:5667)\n at async file:///Users/davidcondrey/.nvm/versions/node/v24.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2218:40569", "timestamp": "2026-04-23T03:00:33.510Z" } ]

Root Cause

Extra usage should act as a fallback, but the application is treating it as the default simply because the setting is turned on. Once the extra usage is depleted, the application throws an "out of usage" error, even though the standard daily/weekly/session usage is completely untouched. Toggling the feature off temporarily fixes the routing.

Code Example

[
  {
    "error": "Error: Failed to delete keychain entry\n    at _2q (file:///Users/davidcondrey/.nvm/versions/node/v24.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:297:269834)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async Gmq (file:///Users/davidcondrey/.nvm/versions/node/v24.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:476:889)\n    at async TE1 (file:///Users/davidcondrey/.nvm/versions/node/v24.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:476:787)\n    at async n88 (file:///Users/davidcondrey/.nvm/versions/node/v24.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2124:2115)\n    at async WH6 (file:///Users/davidcondrey/.nvm/versions/node/v24.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2149:5667)\n    at async file:///Users/davidcondrey/.nvm/versions/node/v24.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2218:40569",
    "timestamp": "2026-04-23T03:00:33.510Z"
  }
]
RAW_BUFFERClick to expand / collapse

When "extra usage" is enabled and a new usage cycle (daily/weekly/session) begins, the application incorrectly consumes the extra usage balance instead of the newly refreshed standard allotment.

Extra usage should act as a fallback, but the application is treating it as the default simply because the setting is turned on. Once the extra usage is depleted, the application throws an "out of usage" error, even though the standard daily/weekly/session usage is completely untouched. Toggling the feature off temporarily fixes the routing.

Steps to Reproduce

  1. Enable "extra usage" in the configuration.
  2. Wait for a daily, weekly, or session usage reset to occur.
  3. Trigger a prompt/action that consumes usage.
  4. Observe that the "extra usage" balance is deducted instead of the standard usage.
  5. Continue until the "extra usage" limit is hit; the app will claim you are out of usage.
  6. Disable "extra usage".
  7. Observe that the application correctly defaults back to the regular usage allotment.

Expected Behavior

Extra usage should only be utilized when the regular daily/weekly/session usage allotment is completely maxed out. It should not be the primary source of usage just because the setting is enabled.

Actual Behavior

The application burns through the extra usage first. Once depleted, it blocks further requests with an "out of usage" error, completely ignoring the available standard usage balance until the "extra usage" toggle is manually disabled.

Environment Info

Platform: darwin (macOS) Terminal: Apple_Terminal Claude Code Version: 2.1.94 Node Version: v24.13.1 (extracted from logs) Feedback ID: 0191bfbf-ed57-4113-a91c-b591e689ab97

Errors / Logs

I am also seeing the following keychain deletion error in the logs, which may be related to how the application is managing or refreshing local usage tokens:

[
  {
    "error": "Error: Failed to delete keychain entry\n    at _2q (file:///Users/davidcondrey/.nvm/versions/node/v24.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:297:269834)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async Gmq (file:///Users/davidcondrey/.nvm/versions/node/v24.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:476:889)\n    at async TE1 (file:///Users/davidcondrey/.nvm/versions/node/v24.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:476:787)\n    at async n88 (file:///Users/davidcondrey/.nvm/versions/node/v24.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2124:2115)\n    at async WH6 (file:///Users/davidcondrey/.nvm/versions/node/v24.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2149:5667)\n    at async file:///Users/davidcondrey/.nvm/versions/node/v24.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2218:40569",
    "timestamp": "2026-04-23T03:00:33.510Z"
  }
]

extent analysis

TL;DR

The application should prioritize the standard usage allotment over the extra usage balance when the "extra usage" feature is enabled.

Guidance

  • Review the usage consumption logic to ensure it checks the standard usage allotment first and only falls back to the extra usage balance when the standard allotment is depleted.
  • Investigate the keychain deletion error in the logs, as it may be related to the application's usage token management and refreshing mechanism.
  • Verify that the application correctly resets and updates the usage balances when a new daily, weekly, or session cycle begins.
  • Check the configuration settings to ensure that the "extra usage" feature is properly implemented as a fallback option.

Example

No code snippet is provided due to the lack of specific implementation details in the issue.

Notes

The keychain deletion error may be a separate issue, but it could be contributing to the usage balance management problems. Further investigation is needed to determine the root cause of the error.

Recommendation

Apply a workaround by disabling the "extra usage" feature until the underlying issue is resolved, as toggling it off temporarily fixes the routing.

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