claude-code - 💡(How to fix) Fix [Bug] Anthropic API Error: credit_balance_too_low despite sufficient account credits [5 comments, 6 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#54839Fetched 2026-04-30 06:34:29
View on GitHub
Comments
5
Participants
6
Timeline
12
Reactions
7
Timeline (top)
commented ×5labeled ×4subscribed ×2cross-referenced ×1

Error Message

[{"error":"MaxFileReadTokenExceededError: File content (31252 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n at Jx_ (B:/~BUN/root/src/entrypoints/cli.js:4906:12810)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T22:55:49.453Z"},{"error":"MaxFileReadTokenExceededError: File content (31252 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n at Jx_ (B:/~BUN/root/src/entrypoints/cli.js:4906:12810)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T23:01:44.644Z"},{"error":"MaxFileReadTokenExceededError: File content (26587 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n at Jx_ (B:/~BUN/root/src/entrypoints/cli.js:4906:12810)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T10:45:29.282Z"},{"error":"MaxFileReadTokenExceededError: File content (31252 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n at Jx_ (B:/~BUN/root/src/entrypoints/cli.js:4906:12810)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T10:47:53.641Z"},{"error":"MaxFileReadTokenExceededError: File content (31252 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n at Jx_ (B:/~BUN/root/src/entrypoints/cli.js:4906:12810)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T10:55:30.962Z"},{"error":"Error: Request was aborted.\n at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T11:38:19.192Z"},{"error":"Error: File does not exist. Note: your current working directory is C:\claude\YQB.\n at call (B:/~BUN/root/src/entrypoints/cli.js:4919:7658)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T12:41:33.346Z"},{"error":"Error: Request was aborted.\n at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T13:07:03.987Z"},{"error":"MaxFileReadTokenExceededError: File content (26587 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n at Jx_ (B:/~BUN/root/src/entrypoints/cli.js:4906:12810)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T13:19:32.444Z"},{"error":"Error: Request was aborted.\n at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T13:44:11.822Z"},{"error":"Error: 429 {"type":"error","error":{"type":"rate_limit_error","message":"This request would exceed your account's rate limit. Please try again later."},"request_id":"req_011CaYBHTj6A97X17K2kvbsU"}\n at generate (B:/~BUN/root/src/entrypoints/cli.js:11:57194)\n at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T13:56:22.635Z"},{"error":"Error: Request was aborted.\n at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T13:56:22.642Z"},{"error":"Error: 429 {"type":"error","error":{"type":"rate_limit_error","message":"This request would exceed your account's rate limit. Please try again later."},"request_id":"re…

Code Example

[{"error":"MaxFileReadTokenExceededError: File content (31252 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at Jx_ (B:/~BUN/root/src/entrypoints/cli.js:4906:12810)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T22:55:49.453Z"},{"error":"MaxFileReadTokenExceededError: File content (31252 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at Jx_ (B:/~BUN/root/src/entrypoints/cli.js:4906:12810)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T23:01:44.644Z"},{"error":"MaxFileReadTokenExceededError: File content (26587 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at Jx_ (B:/~BUN/root/src/entrypoints/cli.js:4906:12810)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T10:45:29.282Z"},{"error":"MaxFileReadTokenExceededError: File content (31252 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at Jx_ (B:/~BUN/root/src/entrypoints/cli.js:4906:12810)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T10:47:53.641Z"},{"error":"MaxFileReadTokenExceededError: File content (31252 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at Jx_ (B:/~BUN/root/src/entrypoints/cli.js:4906:12810)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T10:55:30.962Z"},{"error":"Error: Request was aborted.\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T11:38:19.192Z"},{"error":"Error: File does not exist. Note: your current working directory is C:\\claude\\YQB.\n    at call (B:/~BUN/root/src/entrypoints/cli.js:4919:7658)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T12:41:33.346Z"},{"error":"Error: Request was aborted.\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T13:07:03.987Z"},{"error":"MaxFileReadTokenExceededError: File content (26587 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at Jx_ (B:/~BUN/root/src/entrypoints/cli.js:4906:12810)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T13:19:32.444Z"},{"error":"Error: Request was aborted.\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T13:44:11.822Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"},\"request_id\":\"req_011CaYBHTj6A97X17K2kvbsU\"}\n    at generate (B:/~BUN/root/src/entrypoints/cli.js:11:57194)\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T13:56:22.635Z"},{"error":"Error: Request was aborted.\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T13:56:22.642Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"},\"request_id\":\"re…
RAW_BUFFERClick to expand / collapse

Bug Description Anthropic API billing issue — workspace shows $105 credit balance ($50 paid invoice cleared today + $50 grant + $5 free), no spend limit blocking ($0 of $55 monthly used), Tier 2 rate limits, single workspace/single key. API returns 400 credit_balance_too_low on EVERY request including a max_tokens=1 smoke test. Request IDs: req_011CaYs3ZD1aEGS8FxHHjWaN, req_011CaYqkfQz5LPxgH8e5HWPj. Persisted across two API keys and 90+ minutes after invoice settlement. Tier-1 support confirmed the workspace config looks correct and routed to engineering. Please investigate the disconnect between visible credit balance and API billing validation.

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 2.1.121
  • Feedback ID: 027bfee7-5667-4c54-9b80-cb8245ff6ff9

Errors

[{"error":"MaxFileReadTokenExceededError: File content (31252 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at Jx_ (B:/~BUN/root/src/entrypoints/cli.js:4906:12810)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T22:55:49.453Z"},{"error":"MaxFileReadTokenExceededError: File content (31252 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at Jx_ (B:/~BUN/root/src/entrypoints/cli.js:4906:12810)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T23:01:44.644Z"},{"error":"MaxFileReadTokenExceededError: File content (26587 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at Jx_ (B:/~BUN/root/src/entrypoints/cli.js:4906:12810)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T10:45:29.282Z"},{"error":"MaxFileReadTokenExceededError: File content (31252 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at Jx_ (B:/~BUN/root/src/entrypoints/cli.js:4906:12810)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T10:47:53.641Z"},{"error":"MaxFileReadTokenExceededError: File content (31252 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at Jx_ (B:/~BUN/root/src/entrypoints/cli.js:4906:12810)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T10:55:30.962Z"},{"error":"Error: Request was aborted.\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T11:38:19.192Z"},{"error":"Error: File does not exist. Note: your current working directory is C:\\claude\\YQB.\n    at call (B:/~BUN/root/src/entrypoints/cli.js:4919:7658)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T12:41:33.346Z"},{"error":"Error: Request was aborted.\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T13:07:03.987Z"},{"error":"MaxFileReadTokenExceededError: File content (26587 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at Jx_ (B:/~BUN/root/src/entrypoints/cli.js:4906:12810)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T13:19:32.444Z"},{"error":"Error: Request was aborted.\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T13:44:11.822Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"},\"request_id\":\"req_011CaYBHTj6A97X17K2kvbsU\"}\n    at generate (B:/~BUN/root/src/entrypoints/cli.js:11:57194)\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T13:56:22.635Z"},{"error":"Error: Request was aborted.\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T13:56:22.642Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"},\"request_id\":\"re…

Note: Content was truncated.

extent analysis

TL;DR

The Anthropic API is returning a "credit_balance_too_low" error despite a visible credit balance, suggesting a potential discrepancy between the workspace configuration and API billing validation.

Guidance

  • Verify the workspace configuration and API billing settings to ensure they are correctly aligned, as confirmed by Tier-1 support.
  • Check for any hidden or pending charges that may be affecting the credit balance.
  • Test the API with a minimal request (e.g., max_tokens=1) to isolate the issue and determine if it's related to the request size or the billing validation.
  • Review the error logs for any patterns or clues that may indicate the root cause of the discrepancy.

Example

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

Notes

The issue may be related to a delay in updating the credit balance or a misconfiguration in the workspace settings. Further investigation is needed to determine the root cause.

Recommendation

Apply a workaround by retrying the API request after a short delay to see if the credit balance update propagates, or contact Anthropic support for further assistance.

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