claude-code - 💡(How to fix) Fix [Bug] Sub-agents deploy successfully but fail to accept prompts at runtime [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#56327Fetched 2026-05-06 06:31:05
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Error Message

[{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 212082 tokens > 200000 maximum"},"request_id":"req_011CajcQ7usVEZyCV5nR9Hrc"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:58059)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4949)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T14:52:17.593Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 212082 tokens > 200000 maximum"},"request_id":"req_011CajcRMj7HSfPQG3XZxn8D"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:58059)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4949)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T14:52:34.296Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 212082 tokens > 200000 maximum"},"request_id":"req_011CajcS1C7CjDdPmJXmwGB9"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:58059)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4949)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T14:52:43.540Z"}]

Code Example

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 212082 tokens > 200000 maximum\"},\"request_id\":\"req_011CajcQ7usVEZyCV5nR9Hrc\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:58059)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4949)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T14:52:17.593Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 212082 tokens > 200000 maximum\"},\"request_id\":\"req_011CajcRMj7HSfPQG3XZxn8D\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:58059)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4949)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T14:52:34.296Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 212082 tokens > 200000 maximum\"},\"request_id\":\"req_011CajcS1C7CjDdPmJXmwGB9\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:58059)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4949)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T14:52:43.540Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description sub-agents will deploy but then fail to work? got a message saying the agent isnt accepting the prompt?

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.128
  • Feedback ID: 5ea7f41d-d05a-4f42-b0f0-5180fa111282

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 212082 tokens > 200000 maximum\"},\"request_id\":\"req_011CajcQ7usVEZyCV5nR9Hrc\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:58059)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4949)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T14:52:17.593Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 212082 tokens > 200000 maximum\"},\"request_id\":\"req_011CajcRMj7HSfPQG3XZxn8D\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:58059)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4949)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T14:52:34.296Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 212082 tokens > 200000 maximum\"},\"request_id\":\"req_011CajcS1C7CjDdPmJXmwGB9\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:58059)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4949)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T14:52:43.540Z"}]

extent analysis

TL;DR

The sub-agents fail to work due to the prompt being too long, exceeding the 200000 token maximum.

Guidance

  • Verify the prompt length by checking the number of tokens in the request.
  • Consider shortening the prompt to be within the 200000 token limit.
  • Review the generate function in cli.js to understand how the prompt is being processed and if there are any opportunities to optimize it.
  • Check if there are any configuration options to increase the maximum prompt length, if necessary.

Example

No code snippet is provided as the issue is related to the prompt length and not a specific code implementation.

Notes

The errors indicate that the prompt is too long, which suggests that the issue is not with the code itself but rather with the input being provided. The solution will depend on the specific requirements of the application and the constraints of the platform being used.

Recommendation

Apply workaround: Shorten the prompt to be within the 200000 token limit, as this is the most straightforward solution to resolve the issue.

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

claude-code - 💡(How to fix) Fix [Bug] Sub-agents deploy successfully but fail to accept prompts at runtime [1 comments, 2 participants]