claude-code - 💡(How to fix) Fix [Bug] Explore agents unable to execute due to prompt-size limit constraints [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#45299Fetched 2026-04-09 08:08:35
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
1
Timeline (top)
labeled ×4commented ×1cross-referenced ×1

Error Message

[{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 204858 tokens > 200000 maximum"},"request_id":"req_011CZqFQ4PQ9XvBukUL35UEx"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:02.866Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 207565 tokens > 200000 maximum"},"request_id":"req_011CZqFQNoBU3EondqH3WUPY"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:05.485Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 204858 tokens > 200000 maximum"},"request_id":"req_011CZqFQnet32na8Qq77huXu"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:11.929Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 208914 tokens > 200000 maximum"},"request_id":"req_011CZqFR2zLouEqTnqggTBjt"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:13.797Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 204858 tokens > 200000 maximum"},"request_id":"req_011CZqFRQ75wCWwce5kse9AD"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:20.693Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 212958 tokens > 200000 maximum"},"request_id":"req_011CZqFRgdGCdbffFcefopUP"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:22.800Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 204858 tokens > 200000 maximum"},"request_id":"req_011CZqFS2sRVWcZhU2E7wWLA"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:29.442Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 213379 tokens > 200000 maximum"},"request_id":"req_011CZqFSKYXU84q3L9o95BNi"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:31.108Z"},{"error":"Error: Conversation too long. Press esc twice to go up a few messages and try again.\n at EVH (/$bunfs/root/src/entrypoints/cli.js:4221:938)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:31.110Z"},{"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:5184:119…

Code Example

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 204858 tokens > 200000 maximum\"},\"request_id\":\"req_011CZqFQ4PQ9XvBukUL35UEx\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:02.866Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 207565 tokens > 200000 maximum\"},\"request_id\":\"req_011CZqFQNoBU3EondqH3WUPY\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:05.485Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 204858 tokens > 200000 maximum\"},\"request_id\":\"req_011CZqFQnet32na8Qq77huXu\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:11.929Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 208914 tokens > 200000 maximum\"},\"request_id\":\"req_011CZqFR2zLouEqTnqggTBjt\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:13.797Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 204858 tokens > 200000 maximum\"},\"request_id\":\"req_011CZqFRQ75wCWwce5kse9AD\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:20.693Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 212958 tokens > 200000 maximum\"},\"request_id\":\"req_011CZqFRgdGCdbffFcefopUP\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:22.800Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 204858 tokens > 200000 maximum\"},\"request_id\":\"req_011CZqFS2sRVWcZhU2E7wWLA\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:29.442Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 213379 tokens > 200000 maximum\"},\"request_id\":\"req_011CZqFSKYXU84q3L9o95BNi\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:31.108Z"},{"error":"Error: Conversation too long. Press esc twice to go up a few messages and try again.\n    at EVH (/$bunfs/root/src/entrypoints/cli.js:4221:938)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:31.110Z"},{"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:5184:119
RAW_BUFFERClick to expand / collapse

Bug Description ⏺ 3 Explore agents finished (ctrl+o to expand) ├─ Reuse audit on first-run tutorial changes · 0 tool uses │ ⎿ Done ├─ Quality audit on first-run tutorial changes · 0 tool uses │ ⎿ Done └─ Efficiency audit on first-run tutorial changes · 0 tool uses ⎿ Done

⏺ Explore agents keep hitting prompt-size limits — I'll do the audit directly. Let me inspect the relevant files and the surrounding codebase for existing patterns.

Claude can't seem to start any subagents

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.94
  • Feedback ID: 45cc325d-a2f6-4663-9ea9-5f90e4ffc2f8

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 204858 tokens > 200000 maximum\"},\"request_id\":\"req_011CZqFQ4PQ9XvBukUL35UEx\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:02.866Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 207565 tokens > 200000 maximum\"},\"request_id\":\"req_011CZqFQNoBU3EondqH3WUPY\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:05.485Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 204858 tokens > 200000 maximum\"},\"request_id\":\"req_011CZqFQnet32na8Qq77huXu\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:11.929Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 208914 tokens > 200000 maximum\"},\"request_id\":\"req_011CZqFR2zLouEqTnqggTBjt\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:13.797Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 204858 tokens > 200000 maximum\"},\"request_id\":\"req_011CZqFRQ75wCWwce5kse9AD\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:20.693Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 212958 tokens > 200000 maximum\"},\"request_id\":\"req_011CZqFRgdGCdbffFcefopUP\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:22.800Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 204858 tokens > 200000 maximum\"},\"request_id\":\"req_011CZqFS2sRVWcZhU2E7wWLA\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:29.442Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 213379 tokens > 200000 maximum\"},\"request_id\":\"req_011CZqFSKYXU84q3L9o95BNi\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:51717)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4942)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:31.108Z"},{"error":"Error: Conversation too long. Press esc twice to go up a few messages and try again.\n    at EVH (/$bunfs/root/src/entrypoints/cli.js:4221:938)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T23:06:31.110Z"},{"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:5184:119

Note: Content was truncated.

extent analysis

TL;DR

Reduce the prompt size to below the 200,000 token limit to resolve the "prompt is too long" error.

Guidance

  • Identify and shorten the prompts that exceed the 200,000 token limit.
  • Consider implementing a prompt truncation or summarization mechanism to prevent similar errors in the future.
  • Review the codebase for existing patterns or utilities that can help with prompt size management.
  • Verify that the error messages are accurately reporting the prompt size and adjust the truncation strategy accordingly.

Example

No specific code snippet can be provided without more context, but a general approach might involve checking the length of the prompt before sending it and truncating or splitting it if necessary.

Notes

The provided issue content is truncated, which may limit the ability to provide a comprehensive solution. Additionally, the root cause of the issue appears to be related to the prompt size exceeding the maximum allowed limit, but there might be other factors contributing to the problem.

Recommendation

Apply a workaround to truncate or manage prompt sizes to prevent the "prompt is too long" error, as the issue seems to be related to exceeding the maximum allowed token limit.

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