claude-code - 💡(How to fix) Fix [Bug] Anthropic API Error: Out of Extra Usage despite disabled extra usage tokens [2 comments, 3 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#45116Fetched 2026-04-09 08:12:53
View on GitHub
Comments
2
Participants
3
Timeline
4
Reactions
0
Timeline (top)
commented ×2cross-referenced ×1labeled ×1

Error Message

[{"error":"Error: ENOENT: no such file or directory, scandir '/Library/Application Support/ClaudeCode/.claude/skills'\n at Module.readdirSync (node:fs:1563:26)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:9:1766\n at yO (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:35112)\n at Object.readdirSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:9:1736)\n at _D1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2284:369)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2284:4279\n at q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:6814)\n at CB2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4920:4362)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4920:6961\n at q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:6814)","timestamp":"2026-04-08T09:24:16.332Z"},{"error":"Error: ENOENT: no such file or directory, scandir '/Users/prank/.claude/skills'\n at Module.readdirSync (node:fs:1563:26)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:9:1766\n at yO (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:35112)\n at Object.readdirSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:9:1736)\n at _D1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2284:369)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2284:4322\n at q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:6814)\n at CB2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4920:4362)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4920:6961\n at q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:6814)","timestamp":"2026-04-08T09:24:16.332Z"},{"error":"AggregateError\n at V2A.from (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:26:8270)\n at nP.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:44:9947)\n at nP.emit (node:events:519:35)\n at nP.emit (node:domain:489:12)\n at BL1.<computed> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:43:1120)\n at ClientRequest.emit (node:events:507:28)\n at ClientRequest.emit (node:domain:489:12)\n at emitErrorEvent (node:_http_client:104:11)\n at TLSSocket.socketErrorListener (node:_http_client:518:5)\n at TLSSocket.emit (node:events:507:28)\n at CfA.request (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:46:2132)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async iy2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4367:24285)\n at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4367:25469","timestamp":"2026-04-08T09:24:16.682Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"You're out of extra usage. Add more at claude.ai/settings/usage and keep going."},"request_id":"req_011CZr4YxuxmcairUZyx6Haf"}\n at e7.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:151:37402)\n at PR.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:168:2195)\n at PR.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:168:5420)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2026-04-08T09:24:20.467Z"}]

Code Example

[{"error":"Error: ENOENT: no such file or directory, scandir '/Library/Application Support/ClaudeCode/.claude/skills'\n    at Module.readdirSync (node:fs:1563:26)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:9:1766\n    at yO (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:35112)\n    at Object.readdirSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:9:1736)\n    at _D1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2284:369)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2284:4279\n    at q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:6814)\n    at CB2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4920:4362)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4920:6961\n    at q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:6814)","timestamp":"2026-04-08T09:24:16.332Z"},{"error":"Error: ENOENT: no such file or directory, scandir '/Users/prank/.claude/skills'\n    at Module.readdirSync (node:fs:1563:26)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:9:1766\n    at yO (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:35112)\n    at Object.readdirSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:9:1736)\n    at _D1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2284:369)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2284:4322\n    at q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:6814)\n    at CB2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4920:4362)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4920:6961\n    at q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:6814)","timestamp":"2026-04-08T09:24:16.332Z"},{"error":"AggregateError\n    at V2A.from (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:26:8270)\n    at nP.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:44:9947)\n    at nP.emit (node:events:519:35)\n    at nP.emit (node:domain:489:12)\n    at BL1.<computed> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:43:1120)\n    at ClientRequest.emit (node:events:507:28)\n    at ClientRequest.emit (node:domain:489:12)\n    at emitErrorEvent (node:_http_client:104:11)\n    at TLSSocket.socketErrorListener (node:_http_client:518:5)\n    at TLSSocket.emit (node:events:507:28)\n    at CfA.request (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:46:2132)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async iy2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4367:24285)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4367:25469","timestamp":"2026-04-08T09:24:16.682Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"You're out of extra usage. Add more at claude.ai/settings/usage and keep going.\"},\"request_id\":\"req_011CZr4YxuxmcairUZyx6Haf\"}\n    at e7.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:151:37402)\n    at PR.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:168:2195)\n    at PR.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:168:5420)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2026-04-08T09:24:20.467Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description There are still tokens, but it shows an error:

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"You're out of extra usage. Add more at claude.ai/settings/usage and keep going."},"request_id":"req_011CZr4YxuxmcairUZyx6Haf"}

Even though I’ve already turned off the extra usage tokens.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.19
  • Feedback ID: 82cfd66a-463b-48a3-b910-e9c405957be7

Errors

[{"error":"Error: ENOENT: no such file or directory, scandir '/Library/Application Support/ClaudeCode/.claude/skills'\n    at Module.readdirSync (node:fs:1563:26)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:9:1766\n    at yO (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:35112)\n    at Object.readdirSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:9:1736)\n    at _D1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2284:369)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2284:4279\n    at q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:6814)\n    at CB2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4920:4362)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4920:6961\n    at q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:6814)","timestamp":"2026-04-08T09:24:16.332Z"},{"error":"Error: ENOENT: no such file or directory, scandir '/Users/prank/.claude/skills'\n    at Module.readdirSync (node:fs:1563:26)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:9:1766\n    at yO (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:35112)\n    at Object.readdirSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:9:1736)\n    at _D1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2284:369)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2284:4322\n    at q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:6814)\n    at CB2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4920:4362)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4920:6961\n    at q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:6814)","timestamp":"2026-04-08T09:24:16.332Z"},{"error":"AggregateError\n    at V2A.from (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:26:8270)\n    at nP.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:44:9947)\n    at nP.emit (node:events:519:35)\n    at nP.emit (node:domain:489:12)\n    at BL1.<computed> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:43:1120)\n    at ClientRequest.emit (node:events:507:28)\n    at ClientRequest.emit (node:domain:489:12)\n    at emitErrorEvent (node:_http_client:104:11)\n    at TLSSocket.socketErrorListener (node:_http_client:518:5)\n    at TLSSocket.emit (node:events:507:28)\n    at CfA.request (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:46:2132)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async iy2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4367:24285)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4367:25469","timestamp":"2026-04-08T09:24:16.682Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"You're out of extra usage. Add more at claude.ai/settings/usage and keep going.\"},\"request_id\":\"req_011CZr4YxuxmcairUZyx6Haf\"}\n    at e7.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:151:37402)\n    at PR.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:168:2195)\n    at PR.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:168:5420)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2026-04-08T09:24:20.467Z"}]

extent analysis

TL;DR

Check the usage settings at claude.ai/settings/usage to ensure extra usage tokens are available or properly configured.

Guidance

  1. Verify Extra Usage Tokens: Ensure that extra usage tokens are indeed turned off or properly configured as per the user's intention.
  2. Check Usage Settings: Visit claude.ai/settings/usage to confirm the current usage status and adjust the settings as necessary to avoid the "out of extra usage" error.
  3. Review Error Logs: Examine the provided error logs for any patterns or clues that might indicate a different or additional issue, such as file system errors (ENOENT) that could be contributing to the problem.
  4. Validate File System Access: Ensure that the application has the necessary permissions to access and read from the directories mentioned in the error logs (e.g., '/Library/Application Support/ClaudeCode/.claude/skills', '/Users/prank/.claude/skills').

Example

No specific code example is provided due to the nature of the issue, which seems more related to configuration and usage limits rather than a code-level problem.

Notes

The issue seems to be related to the usage limits of the Claude AI service rather than a technical issue with the code itself. Ensuring that the usage settings are correctly configured and that there are sufficient tokens available should resolve the "out of extra usage" error. However, the presence of file system errors (ENOENT) in the logs suggests that there might be additional configuration or permission issues that need to be addressed.

Recommendation

Apply workaround: Check and adjust the usage settings at claude.ai/settings/usage to ensure that extra usage tokens are available or properly configured, as this directly addresses the stated error message.

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