claude-code - 💡(How to fix) Fix [Bug] Claude fails to follow simple instructions and plot sequences [1 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#47020Fetched 2026-04-13 05:43:37
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4

Error Message

[{"error":"MaxFileReadTokenExceededError: File content (22008 tokens) exceeds maximum allowed tokens (10000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n at kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T13:53:26.910Z"},{"error":"Error: Request was aborted.\n at BE_ (/$bunfs/root/src/entrypoints/cli.js:1268:12089)\n at next (native:1:11)\n at tm7 (/$bunfs/root/src/entrypoints/cli.js:7918:9109)\n at next (native:1:11)\n at _p7 (/$bunfs/root/src/entrypoints/cli.js:7923:12068)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T14:05:45.468Z"},{"error":"MaxFileReadTokenExceededError: File content (23150 tokens) exceeds maximum allowed tokens (10000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n at kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T14:45:37.926Z"}]

Code Example

[{"error":"MaxFileReadTokenExceededError: File content (22008 tokens) exceeds maximum allowed tokens (10000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T13:53:26.910Z"},{"error":"Error: Request was aborted.\n    at BE_ (/$bunfs/root/src/entrypoints/cli.js:1268:12089)\n    at next (native:1:11)\n    at tm7 (/$bunfs/root/src/entrypoints/cli.js:7918:9109)\n    at next (native:1:11)\n    at _p7 (/$bunfs/root/src/entrypoints/cli.js:7923:12068)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T14:05:45.468Z"},{"error":"MaxFileReadTokenExceededError: File content (23150 tokens) exceeds maximum allowed tokens (10000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T14:45:37.926Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description Couldnt follow easy instructions or plots.

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.104
  • Feedback ID: c98967de-a0b7-4b94-b0cd-6e856b20195c

Errors

[{"error":"MaxFileReadTokenExceededError: File content (22008 tokens) exceeds maximum allowed tokens (10000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T13:53:26.910Z"},{"error":"Error: Request was aborted.\n    at BE_ (/$bunfs/root/src/entrypoints/cli.js:1268:12089)\n    at next (native:1:11)\n    at tm7 (/$bunfs/root/src/entrypoints/cli.js:7918:9109)\n    at next (native:1:11)\n    at _p7 (/$bunfs/root/src/entrypoints/cli.js:7923:12068)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T14:05:45.468Z"},{"error":"MaxFileReadTokenExceededError: File content (23150 tokens) exceeds maximum allowed tokens (10000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T14:45:37.926Z"}]

extent analysis

TL;DR

Use the offset and limit parameters to read specific portions of the file instead of reading the whole file to avoid the MaxFileReadTokenExceededError.

Guidance

  • The error messages indicate that the file content exceeds the maximum allowed tokens, suggesting that the file is too large to be read in a single operation.
  • To mitigate this, use the offset and limit parameters to read specific portions of the file, as suggested in the error message.
  • Review the code at /src/entrypoints/cli.js lines 4449 and 1268 to understand how file reading is currently implemented and modify it to use pagination or streaming.
  • Consider searching for specific content instead of reading the whole file to reduce the amount of data being processed.

Example

No specific code example can be provided without more context, but the general approach would involve modifying the file reading function to accept offset and limit parameters, like readFile(offset, limit).

Notes

The provided errors and stack traces suggest that the issue is related to reading large files, but without more information about the code and its intended functionality, it's difficult to provide a more specific solution.

Recommendation

Apply workaround: Modify the file reading code to use offset and limit parameters to avoid reading large files in a single operation, as this is a direct solution to the MaxFileReadTokenExceededError.

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