claude-code - 💡(How to fix) Fix [Bug] CLI hangs indefinitely during execution with no completion [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#45168Fetched 2026-04-09 08:11:43
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×3commented ×1cross-referenced ×1

Error Message

[{"error":"MaxFileReadTokenExceededError: File content (10572 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 CT7 (/$bunfs/root/src/entrypoints/cli.js:4309:13191)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T11:39:54.366Z"},{"error":"Error: Request was aborted.\n at sV_ (/$bunfs/root/src/entrypoints/cli.js:1244:11929)\n at next (native:1:11)\n at Cb7 (/$bunfs/root/src/entrypoints/cli.js:7777:9035)\n at next (native:1:11)\n at xb7 (/$bunfs/root/src/entrypoints/cli.js:7782:11451)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T11:52:30.089Z"}]

Code Example

[{"error":"MaxFileReadTokenExceededError: File content (10572 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 CT7 (/$bunfs/root/src/entrypoints/cli.js:4309:13191)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T11:39:54.366Z"},{"error":"Error: Request was aborted.\n    at sV_ (/$bunfs/root/src/entrypoints/cli.js:1244:11929)\n    at next (native:1:11)\n    at Cb7 (/$bunfs/root/src/entrypoints/cli.js:7777:9035)\n    at next (native:1:11)\n    at xb7 (/$bunfs/root/src/entrypoints/cli.js:7782:11451)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T11:52:30.089Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description lot of time and keeps on loading

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.96
  • Feedback ID: 85fa283b-57cc-433b-9cc6-b520e318b690

Errors

[{"error":"MaxFileReadTokenExceededError: File content (10572 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 CT7 (/$bunfs/root/src/entrypoints/cli.js:4309:13191)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T11:39:54.366Z"},{"error":"Error: Request was aborted.\n    at sV_ (/$bunfs/root/src/entrypoints/cli.js:1244:11929)\n    at next (native:1:11)\n    at Cb7 (/$bunfs/root/src/entrypoints/cli.js:7777:9035)\n    at next (native:1:11)\n    at xb7 (/$bunfs/root/src/entrypoints/cli.js:7782:11451)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T11:52:30.089Z"}]

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 message suggests that the file being read exceeds the maximum allowed tokens, so try to limit the amount of data being read.
  • Check the API documentation for the offset and limit parameters to understand how to use them to read specific portions of the file.
  • Consider searching for specific content instead of reading the whole file to reduce the amount of data being processed.
  • Review the code at cli.js:4309:13191 to identify where the file is being read and modify it to use the suggested parameters.

Example

No code example is provided as the issue does not include enough context about the code.

Notes

The provided errors suggest that the issue is related to reading large files, but without more information about the code and the specific use case, it's difficult to provide a more detailed solution.

Recommendation

Apply workaround: The error message provides a clear suggestion to use the offset and limit parameters to read specific portions of the file, which should help mitigate 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