claude-code - 💡(How to fix) Fix [Bug] Sub-agent task hangs without progress for extended duration [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#46230Fetched 2026-04-11 06:25:43
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Error Message

[{"error":"Error: LSP server plugin:rust-analyzer-lsp:rust-analyzer crashed with exit code 1\n at ChildProcess.<anonymous> (file:///Users/ekscrypto/.nvm/versions/node/v24.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2392:21524)\n at ChildProcess.emit (node:events:508:28)\n at ChildProcess._handle.onexit (node:internal/child_process:294:12)","timestamp":"2026-04-10T11:35:04.862Z"},{"error":"MaxFileReadTokenExceededError: File content (35608 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n at Fy7 (file:///Users/ekscrypto/.nvm/versions/node/v24.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1347:7513)\n at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n at async Qy7 (file:///Users/ekscrypto/.nvm/versions/node/v24.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1351:2435)\n at async Object.call (file:///Users/ekscrypto/.nvm/versions/node/v24.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1356:5845)\n at async file:///Users/ekscrypto/.nvm/versions/node/v24.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:5855:1955","timestamp":"2026-04-10T13:14:33.876Z"}]

Code Example

[{"error":"Error: LSP server plugin:rust-analyzer-lsp:rust-analyzer crashed with exit code 1\n    at ChildProcess.<anonymous> (file:///Users/ekscrypto/.nvm/versions/node/v24.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2392:21524)\n    at ChildProcess.emit (node:events:508:28)\n    at ChildProcess._handle.onexit (node:internal/child_process:294:12)","timestamp":"2026-04-10T11:35:04.862Z"},{"error":"MaxFileReadTokenExceededError: File content (35608 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n    at Fy7 (file:///Users/ekscrypto/.nvm/versions/node/v24.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1347:7513)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async Qy7 (file:///Users/ekscrypto/.nvm/versions/node/v24.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1351:2435)\n    at async Object.call (file:///Users/ekscrypto/.nvm/versions/node/v24.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1356:5845)\n    at async file:///Users/ekscrypto/.nvm/versions/node/v24.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:5855:1955","timestamp":"2026-04-10T13:14:33.876Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description One of the sub-agent task seems to be stuck. Been waiting for over 20 minutes with no written progress on disk.

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.45
  • Feedback ID: af2ea500-21f2-4b9f-9ecf-1af70b787811

Errors

[{"error":"Error: LSP server plugin:rust-analyzer-lsp:rust-analyzer crashed with exit code 1\n    at ChildProcess.<anonymous> (file:///Users/ekscrypto/.nvm/versions/node/v24.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2392:21524)\n    at ChildProcess.emit (node:events:508:28)\n    at ChildProcess._handle.onexit (node:internal/child_process:294:12)","timestamp":"2026-04-10T11:35:04.862Z"},{"error":"MaxFileReadTokenExceededError: File content (35608 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n    at Fy7 (file:///Users/ekscrypto/.nvm/versions/node/v24.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1347:7513)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async Qy7 (file:///Users/ekscrypto/.nvm/versions/node/v24.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1351:2435)\n    at async Object.call (file:///Users/ekscrypto/.nvm/versions/node/v24.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1356:5845)\n    at async file:///Users/ekscrypto/.nvm/versions/node/v24.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:5855:1955","timestamp":"2026-04-10T13:14:33.876Z"}]

extent analysis

TL;DR

The issue may be resolved by adjusting the file reading parameters to handle large files, specifically using offset and limit parameters or the GrepTool.

Guidance

  • Investigate the MaxFileReadTokenExceededError and consider implementing pagination or partial file reading to avoid exceeding the maximum allowed tokens.
  • Review the error message indicating the rust-analyzer-lsp crashed with exit code 1, and check if there are any known issues or updates for the rust-analyzer-lsp plugin.
  • Verify if the issue persists after restarting the sub-agent task or the entire system.
  • Check the documentation for the @anthropic-ai/claude-code/cli.js module to see if there are any configuration options or workarounds for handling large files.

Example

No specific code example can be provided without more context, but adjusting the file reading parameters might involve modifying function calls to include offset and limit parameters, such as readFile(offset, limit).

Notes

The provided information suggests that the issue might be related to handling large files, but without more context or details about the code and system configuration, it's difficult to provide a more specific solution.

Recommendation

Apply workaround: Adjusting the file reading parameters or using the GrepTool might help mitigate the issue, especially for handling large files.

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-agent task hangs without progress for extended duration [1 comments, 2 participants]