claude-code - 💡(How to fix) Fix 500 errors [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#48625Fetched 2026-04-16 06:55:21
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
1
Timeline (top)
labeled ×4commented ×1

Error Message

[{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 213463 tokens > 200000 maximum"},"request_id":"req_011Ca3nR86aEF8UbGELf38iZ"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T13:59:54.685Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 206282 tokens > 200000 maximum"},"request_id":"req_011Ca3nRHnV67aA1MmDMKWkr"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T13:59:56.793Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 214640 tokens > 200000 maximum"},"request_id":"req_011Ca3nRT17mTBZgoBRFcRVX"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:00.145Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 210099 tokens > 200000 maximum"},"request_id":"req_011Ca3nRgS1MKDGwSGvJSX8X"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:01.256Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 200906 tokens > 200000 maximum"},"request_id":"req_011Ca3nRmHTenSdbbLhtnyi1"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:05.214Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 212952 tokens > 200000 maximum"},"request_id":"req_011Ca3nS4qtohyx1HeK6f7GF"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:08.116Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 205595 tokens > 200000 maximum"},"request_id":"req_011Ca3nSGeZ62TxHiRokPq4K"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:09.673Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 215368 tokens > 200000 maximum"},"request_id":"req_011Ca3nSP6FN8K76dt2tbnj3"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:11.525Z"},{"error":"Error: Conversation too long. Press esc twice to go up a few messages and try again.\n at WCH (/$bunfs/root/src/entrypoints/cli.js:4396:1004)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:11.529Z"},{"error":"Error: Error during compaction: Conversation too long. Press esc twice to go up a few messages and try again.\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:5301:1180)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:11.530Z"},{"error":"Error: Request was aborted.\n at qb_ (/$bunfs/root/src/entrypoints/cli.js:1287:12508)\n at next (native:1:11)\n at Ag7 (/$bunfs/root/src/entrypoints/cli.js:7893:9167)\n at next (native:1:11)\n at Yg7 (/$bunfs/root/src/entrypoints/cli.js:7898:12433)\n at processTicksAndRejections (native…

Code Example

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 213463 tokens > 200000 maximum\"},\"request_id\":\"req_011Ca3nR86aEF8UbGELf38iZ\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T13:59:54.685Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 206282 tokens > 200000 maximum\"},\"request_id\":\"req_011Ca3nRHnV67aA1MmDMKWkr\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T13:59:56.793Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 214640 tokens > 200000 maximum\"},\"request_id\":\"req_011Ca3nRT17mTBZgoBRFcRVX\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:00.145Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 210099 tokens > 200000 maximum\"},\"request_id\":\"req_011Ca3nRgS1MKDGwSGvJSX8X\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:01.256Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 200906 tokens > 200000 maximum\"},\"request_id\":\"req_011Ca3nRmHTenSdbbLhtnyi1\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:05.214Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 212952 tokens > 200000 maximum\"},\"request_id\":\"req_011Ca3nS4qtohyx1HeK6f7GF\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:08.116Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 205595 tokens > 200000 maximum\"},\"request_id\":\"req_011Ca3nSGeZ62TxHiRokPq4K\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:09.673Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 215368 tokens > 200000 maximum\"},\"request_id\":\"req_011Ca3nSP6FN8K76dt2tbnj3\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:11.525Z"},{"error":"Error: Conversation too long. Press esc twice to go up a few messages and try again.\n    at WCH (/$bunfs/root/src/entrypoints/cli.js:4396:1004)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:11.529Z"},{"error":"Error: Error during compaction: Conversation too long. Press esc twice to go up a few messages and try again.\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:5301:1180)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:11.530Z"},{"error":"Error: Request was aborted.\n    at qb_ (/$bunfs/root/src/entrypoints/cli.js:1287:12508)\n    at next (native:1:11)\n    at Ag7 (/$bunfs/root/src/entrypoints/cli.js:7893:9167)\n    at next (native:1:11)\n    at Yg7 (/$bunfs/root/src/entrypoints/cli.js:7898:12433)\n    at processTicksAndRejections (native…
RAW_BUFFERClick to expand / collapse

Bug Description Why do I keep getting 500 errors? Thousands of others do too. This happens every week. Is this an overloading condition?

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.105
  • Feedback ID: cef82e25-550c-4ece-99c0-db043247dfb9

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 213463 tokens > 200000 maximum\"},\"request_id\":\"req_011Ca3nR86aEF8UbGELf38iZ\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T13:59:54.685Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 206282 tokens > 200000 maximum\"},\"request_id\":\"req_011Ca3nRHnV67aA1MmDMKWkr\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T13:59:56.793Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 214640 tokens > 200000 maximum\"},\"request_id\":\"req_011Ca3nRT17mTBZgoBRFcRVX\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:00.145Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 210099 tokens > 200000 maximum\"},\"request_id\":\"req_011Ca3nRgS1MKDGwSGvJSX8X\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:01.256Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 200906 tokens > 200000 maximum\"},\"request_id\":\"req_011Ca3nRmHTenSdbbLhtnyi1\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:05.214Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 212952 tokens > 200000 maximum\"},\"request_id\":\"req_011Ca3nS4qtohyx1HeK6f7GF\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:08.116Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 205595 tokens > 200000 maximum\"},\"request_id\":\"req_011Ca3nSGeZ62TxHiRokPq4K\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:09.673Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 215368 tokens > 200000 maximum\"},\"request_id\":\"req_011Ca3nSP6FN8K76dt2tbnj3\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52464)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:11.525Z"},{"error":"Error: Conversation too long. Press esc twice to go up a few messages and try again.\n    at WCH (/$bunfs/root/src/entrypoints/cli.js:4396:1004)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:11.529Z"},{"error":"Error: Error during compaction: Conversation too long. Press esc twice to go up a few messages and try again.\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:5301:1180)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T14:00:11.530Z"},{"error":"Error: Request was aborted.\n    at qb_ (/$bunfs/root/src/entrypoints/cli.js:1287:12508)\n    at next (native:1:11)\n    at Ag7 (/$bunfs/root/src/entrypoints/cli.js:7893:9167)\n    at next (native:1:11)\n    at Yg7 (/$bunfs/root/src/entrypoints/cli.js:7898:12433)\n    at processTicksAndRejections (native…

Note: Content was truncated.

extent analysis

TL;DR

Reduce the prompt length to below 200,000 tokens to resolve the "prompt is too long" error.

Guidance

  • The errors indicate that the prompt length exceeds the maximum allowed limit of 200,000 tokens, causing "invalid_request_error" and "Conversation too long" errors.
  • To mitigate this, shorten the input prompt to ensure it is within the allowed token limit.
  • If the issue persists, consider splitting the prompt into smaller, manageable parts to process sequentially.
  • Review the provided error messages for specific token counts to guide the prompt length reduction.

Example

No code example is provided as the issue is related to input length rather than code syntax.

Notes

The solution assumes that the error is solely due to the prompt length. Other factors might contribute to the issue, but based on the provided information, reducing the prompt length is the most direct approach to resolve the "prompt is too long" errors.

Recommendation

Apply workaround: Shorten the prompt length to below 200,000 tokens. This directly addresses the "prompt is too long" error messages provided in the issue description.

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