claude-code - 💡(How to fix) Fix [Bug] Excessive token consumption due to infinite thinking loops blocking progress [2 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#56206Fetched 2026-05-06 06:34:20
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×4commented ×2cross-referenced ×1

Error Message

[{"error":"AxiosError: Request failed with status code 404\n at pn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12710)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:865:50)\n at processTicksAndRejections (native:7:39)\n at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T16:21:27.114Z"},{"error":"AxiosError: Request failed with status code 404\n at pn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12710)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:865:50)\n at processTicksAndRejections (native:7:39)\n at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T16:21:53.088Z"},{"error":"AxiosError: Request failed with status code 404\n at pn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12710)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:865:50)\n at processTicksAndRejections (native:7:39)\n at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T16:22:32.546Z"},{"error":"AxiosError: Request failed with status code 303\n at pn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12710)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:865:50)\n at processTicksAndRejections (native:7:39)\n at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T16:22:34.332Z"},{"error":"AxiosError: Request failed with status code 404\n at pn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12710)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:865:50)\n at processTicksAndRejections (native:7:39)\n at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T16:22:37.940Z"},{"error":"AxiosError: Request failed with status code 404\n at pn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12710)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:865:50)\n at processTicksAndRejections (native:7:39)\n at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T16:22:40.629Z"},{"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_011Cahtf4SnqDcc7c6Z9bMm1"}\n at generate (B:/~BUN/root/src/entrypoints/cli.js:11:57304)\n at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T17:04:16.698Z"},{"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_011CahvAmuaQr8XqbR8V37dv"}\n at generate (B:/~BUN/root/src/entrypoints/cli.js:11:57304)\n at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T17:24:06.857Z"}]

Root Cause

Bug Description in the last 24hrs I've nearly burnt 2 session usage limits by it getting stuck thinking and stuff. you guys work on this principle that no refunds or reverts of usage can happen, but most definitively I am not getting any actual usage out of the modal because of this issue. It is halting progress.

Code Example

[{"error":"AxiosError: Request failed with status code 404\n    at pn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12710)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T16:21:27.114Z"},{"error":"AxiosError: Request failed with status code 404\n    at pn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12710)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T16:21:53.088Z"},{"error":"AxiosError: Request failed with status code 404\n    at pn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12710)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T16:22:32.546Z"},{"error":"AxiosError: Request failed with status code 303\n    at pn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12710)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T16:22:34.332Z"},{"error":"AxiosError: Request failed with status code 404\n    at pn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12710)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T16:22:37.940Z"},{"error":"AxiosError: Request failed with status code 404\n    at pn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12710)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T16:22:40.629Z"},{"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_011Cahtf4SnqDcc7c6Z9bMm1\"}\n    at generate (B:/~BUN/root/src/entrypoints/cli.js:11:57304)\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T17:04:16.698Z"},{"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_011CahvAmuaQr8XqbR8V37dv\"}\n    at generate (B:/~BUN/root/src/entrypoints/cli.js:11:57304)\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T17:24:06.857Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description in the last 24hrs I've nearly burnt 2 session usage limits by it getting stuck thinking and stuff. you guys work on this principle that no refunds or reverts of usage can happen, but most definitively I am not getting any actual usage out of the modal because of this issue. It is halting progress.

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 2.1.126
  • Feedback ID: a1fa3b8e-0236-4d5e-ae42-91218d3aed0a

Errors

[{"error":"AxiosError: Request failed with status code 404\n    at pn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12710)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T16:21:27.114Z"},{"error":"AxiosError: Request failed with status code 404\n    at pn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12710)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T16:21:53.088Z"},{"error":"AxiosError: Request failed with status code 404\n    at pn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12710)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T16:22:32.546Z"},{"error":"AxiosError: Request failed with status code 303\n    at pn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12710)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T16:22:34.332Z"},{"error":"AxiosError: Request failed with status code 404\n    at pn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12710)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T16:22:37.940Z"},{"error":"AxiosError: Request failed with status code 404\n    at pn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12710)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T16:22:40.629Z"},{"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_011Cahtf4SnqDcc7c6Z9bMm1\"}\n    at generate (B:/~BUN/root/src/entrypoints/cli.js:11:57304)\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T17:04:16.698Z"},{"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_011CahvAmuaQr8XqbR8V37dv\"}\n    at generate (B:/~BUN/root/src/entrypoints/cli.js:11:57304)\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T17:24:06.857Z"}]

extent analysis

TL;DR

The issue is likely caused by exceeding the account's rate limit, resulting in 429 errors, and the modal getting stuck due to repeated 404 errors.

Guidance

  • Verify the rate limit error messages in the logs, which indicate that the account's rate limit has been exceeded.
  • Check the request frequency and adjust it to be within the allowed rate limit to prevent 429 errors.
  • Investigate the cause of the repeated 404 errors, which may be due to incorrect API endpoints or missing resources.
  • Consider implementing exponential backoff or retry mechanisms to handle temporary rate limit errors and 404 errors.

Example

No code example is provided as the issue is related to rate limiting and 404 errors, which require adjustments to the request frequency and API endpoints rather than code changes.

Notes

The issue may be specific to the user's account or environment, and further investigation is needed to determine the root cause of the 404 errors.

Recommendation

Apply a workaround by adjusting the request frequency to be within the allowed rate limit and implementing retry mechanisms to handle temporary errors. This will help prevent the modal from getting stuck and reduce the number of 429 errors.

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