claude-code - 💡(How to fix) Fix [Bug Report: Model performance degradation or unexpected behavior changes] [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#56486Fetched 2026-05-06 06:26:46
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Error Message

[{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 206472 tokens > 200000 maximum"},"request_id":"req_011Cab49tdGeEFVhCvuGTPq3"}\n at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:24:42.685Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 217424 tokens > 200000 maximum"},"request_id":"req_011Cab4A5NBiFjdSt4yKqyjG"}\n at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:24:45.920Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 206554 tokens > 200000 maximum"},"request_id":"req_011Cab4ALBui8dRc7p1yamk6"}\n at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:24:48.929Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 201886 tokens > 200000 maximum"},"request_id":"req_011Cab4AY8WTRfSCYnDfUmjw"}\n at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:24:53.298Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 207348 tokens > 200000 maximum"},"request_id":"req_011Cab4AsgVoi5PcnQn5sBCK"}\n at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:24:56.217Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 202720 tokens > 200000 maximum"},"request_id":"req_011Cab4B5XdVHf8bCZnk5tLa"}\n at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:24:58.411Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 207563 tokens > 200000 maximum"},"request_id":"req_011Cab4BF2dWHj6xLdXoy2j3"}\n at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:25:00.642Z"},{"error":"Error: 400 {"type":"error","error":{"type…

Code Example

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 206472 tokens > 200000 maximum\"},\"request_id\":\"req_011Cab49tdGeEFVhCvuGTPq3\"}\n    at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n    at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n    at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:24:42.685Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 217424 tokens > 200000 maximum\"},\"request_id\":\"req_011Cab4A5NBiFjdSt4yKqyjG\"}\n    at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n    at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n    at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:24:45.920Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 206554 tokens > 200000 maximum\"},\"request_id\":\"req_011Cab4ALBui8dRc7p1yamk6\"}\n    at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n    at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n    at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:24:48.929Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 201886 tokens > 200000 maximum\"},\"request_id\":\"req_011Cab4AY8WTRfSCYnDfUmjw\"}\n    at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n    at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n    at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:24:53.298Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 207348 tokens > 200000 maximum\"},\"request_id\":\"req_011Cab4AsgVoi5PcnQn5sBCK\"}\n    at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n    at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n    at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:24:56.217Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 202720 tokens > 200000 maximum\"},\"request_id\":\"req_011Cab4B5XdVHf8bCZnk5tLa\"}\n    at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n    at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n    at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:24:58.411Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 207563 tokens > 200000 maximum\"},\"request_id\":\"req_011Cab4BF2dWHj6xLdXoy2j3\"}\n    at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n    at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n    at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:25:00.642Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type…
RAW_BUFFERClick to expand / collapse

Bug Description Its getting dumber, forgetting the entire point of the project, forgetting details in memory, not even looking at global memory.

Environment Info

  • Platform: darwin
  • Terminal: tmux
  • Version: 2.1.97
  • Feedback ID: 81f7516b-3826-48ae-a3ec-b323144e7abf

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 206472 tokens > 200000 maximum\"},\"request_id\":\"req_011Cab49tdGeEFVhCvuGTPq3\"}\n    at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n    at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n    at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:24:42.685Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 217424 tokens > 200000 maximum\"},\"request_id\":\"req_011Cab4A5NBiFjdSt4yKqyjG\"}\n    at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n    at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n    at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:24:45.920Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 206554 tokens > 200000 maximum\"},\"request_id\":\"req_011Cab4ALBui8dRc7p1yamk6\"}\n    at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n    at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n    at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:24:48.929Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 201886 tokens > 200000 maximum\"},\"request_id\":\"req_011Cab4AY8WTRfSCYnDfUmjw\"}\n    at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n    at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n    at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:24:53.298Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 207348 tokens > 200000 maximum\"},\"request_id\":\"req_011Cab4AsgVoi5PcnQn5sBCK\"}\n    at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n    at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n    at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:24:56.217Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 202720 tokens > 200000 maximum\"},\"request_id\":\"req_011Cab4B5XdVHf8bCZnk5tLa\"}\n    at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n    at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n    at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:24:58.411Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 207563 tokens > 200000 maximum\"},\"request_id\":\"req_011Cab4BF2dWHj6xLdXoy2j3\"}\n    at dq.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:51908)\n    at ML.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:1652)\n    at ML.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:47:4928)\n    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","timestamp":"2026-05-01T02:25:00.642Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type…

Note: Content was truncated.

extent analysis

TL;DR

The most likely fix is to reduce the length of the prompt to below 200,000 tokens.

Guidance

  • Verify the prompt length by checking the error messages, which indicate that the prompt exceeds the 200,000 token limit.
  • Shorten the prompt by removing unnecessary information or splitting it into smaller, more focused prompts.
  • Consider implementing a prompt validation check to prevent similar errors in the future.
  • Review the code that generates the prompt to identify areas where token count can be optimized.

Example

No code snippet is provided as the issue is related to prompt length, not code syntax.

Notes

The provided error messages are truncated, but the pattern of "prompt is too long" errors suggests that the issue is related to exceeding the token limit. Reducing the prompt length should resolve the issue.

Recommendation

Apply a workaround by shortening the prompt to below 200,000 tokens, as this is the most direct solution to the error messages provided.

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