claude-code - 💡(How to fix) Fix [Bug] Subagents exhibit unreliable behavior and inconsistent execution [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#48369Fetched 2026-04-16 07:02:07
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Error Message

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/joon/.local/share/claude/versions/2.1.74 (expected in multi-process scenarios)\n at kvT (/$bunfs/root/src/entrypoints/cli.js:2644:2025)\n at Cbq (/$bunfs/root/src/entrypoints/cli.js:2644:1169)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:11:17.016Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6. Did you mean /Users/joon/projects/twoj/zoro/dibs/ferumv6/services/strategy/service.go?\n at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:31:37.261Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6. Did you mean /Users/joon/projects/twoj/zoro/dibs/ferumv6/services/strategy/errors.go?\n at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:31:37.661Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6. Did you mean /Users/joon/projects/twoj/zoro/dibs/ferumv6/services/strategy/service_mock.go?\n at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:31:38.312Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6. Did you mean /Users/joon/projects/twoj/zoro/dibs/ferumv6/services/strategy/service_test.go?\n at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:31:38.571Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6. Did you mean /Users/joon/projects/twoj/zoro/dibs/ferumv6/services/strategy/types_test.go?\n at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:31:39.048Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6. Did you mean /Users/joon/projects/twoj/zoro/dibs/ferumv6/services/strategy/errors_test.go?\n at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:31:39.156Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6.\n at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:32:28.067Z"},{"error":"Error\n at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n at processTicksAndRejections (unknown:7:39)","timestamp":"2026-04-15T07:59:24.208Z"},{"error":"MaxFileReadTokenExceededError: File content (33985 tokens) exceeds maximum allowed tokens (25000). 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 Sn6 (/$bunfs/root/src/entrypoints/cli.js:1457:8064)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T08:00:16.029Z"},{"error":"MaxFileReadTokenExceededError: File content (33985 tokens) exceeds maximum allowed tokens (25000). 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 Sn6 (/$bunfs/root/src/entrypoints/cli.js:1457:8064)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T08:02:41.219Z"},{"error":"Error: Cannot resume agent abbb49c4a556dc6e3: it is still running. Use TaskStop to stop it first, or wait for it to complete.\n at call (/$bunfs/root/src/entrypoints/cli.js:2995:10007)\n at XCK (/$bunfs/root/src/entrypoints/cli.js:3909:15032)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T08:02:44.335Z"},{"error":"Error: Cannot resume agent aceedb424764dc87d: it is still running. Use TaskStop to stop it first, or wait for it to complete.\n at call (/$bunfs/root/src/entrypoints/cli.js:2995:10007)\n at XCK (/$bunfs/root/src/entrypoints/cli.js:3909:15032)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T08:02:45.042Z"},{"error":"MaxFileReadTokenExceededError: File content (33985 tokens) exceeds maximum allowed tokens (25000). 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 Sn6 (/$bunf…

Code Example

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/joon/.local/share/claude/versions/2.1.74 (expected in multi-process scenarios)\n    at kvT (/$bunfs/root/src/entrypoints/cli.js:2644:2025)\n    at Cbq (/$bunfs/root/src/entrypoints/cli.js:2644:1169)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:11:17.016Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6. Did you mean /Users/joon/projects/twoj/zoro/dibs/ferumv6/services/strategy/service.go?\n    at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:31:37.261Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6. Did you mean /Users/joon/projects/twoj/zoro/dibs/ferumv6/services/strategy/errors.go?\n    at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:31:37.661Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6. Did you mean /Users/joon/projects/twoj/zoro/dibs/ferumv6/services/strategy/service_mock.go?\n    at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:31:38.312Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6. Did you mean /Users/joon/projects/twoj/zoro/dibs/ferumv6/services/strategy/service_test.go?\n    at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:31:38.571Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6. Did you mean /Users/joon/projects/twoj/zoro/dibs/ferumv6/services/strategy/types_test.go?\n    at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:31:39.048Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6. Did you mean /Users/joon/projects/twoj/zoro/dibs/ferumv6/services/strategy/errors_test.go?\n    at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:31:39.156Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6.\n    at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:32:28.067Z"},{"error":"Error\n    at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n    at processTicksAndRejections (unknown:7:39)","timestamp":"2026-04-15T07:59:24.208Z"},{"error":"MaxFileReadTokenExceededError: File content (33985 tokens) exceeds maximum allowed tokens (25000). 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 Sn6 (/$bunfs/root/src/entrypoints/cli.js:1457:8064)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T08:00:16.029Z"},{"error":"MaxFileReadTokenExceededError: File content (33985 tokens) exceeds maximum allowed tokens (25000). 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 Sn6 (/$bunfs/root/src/entrypoints/cli.js:1457:8064)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T08:02:41.219Z"},{"error":"Error: Cannot resume agent abbb49c4a556dc6e3: it is still running. Use TaskStop to stop it first, or wait for it to complete.\n    at call (/$bunfs/root/src/entrypoints/cli.js:2995:10007)\n    at XCK (/$bunfs/root/src/entrypoints/cli.js:3909:15032)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T08:02:44.335Z"},{"error":"Error: Cannot resume agent aceedb424764dc87d: it is still running. Use TaskStop to stop it first, or wait for it to complete.\n    at call (/$bunfs/root/src/entrypoints/cli.js:2995:10007)\n    at XCK (/$bunfs/root/src/entrypoints/cli.js:3909:15032)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T08:02:45.042Z"},{"error":"MaxFileReadTokenExceededError: File content (33985 tokens) exceeds maximum allowed tokens (25000). 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 Sn6 (/$bunf…
RAW_BUFFERClick to expand / collapse

Bug Description subagents look very flaky in this run

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.74
  • Feedback ID: 2f2c6ccf-bdc9-46cd-a9a6-5192d40e0293

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/joon/.local/share/claude/versions/2.1.74 (expected in multi-process scenarios)\n    at kvT (/$bunfs/root/src/entrypoints/cli.js:2644:2025)\n    at Cbq (/$bunfs/root/src/entrypoints/cli.js:2644:1169)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:11:17.016Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6. Did you mean /Users/joon/projects/twoj/zoro/dibs/ferumv6/services/strategy/service.go?\n    at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:31:37.261Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6. Did you mean /Users/joon/projects/twoj/zoro/dibs/ferumv6/services/strategy/errors.go?\n    at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:31:37.661Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6. Did you mean /Users/joon/projects/twoj/zoro/dibs/ferumv6/services/strategy/service_mock.go?\n    at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:31:38.312Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6. Did you mean /Users/joon/projects/twoj/zoro/dibs/ferumv6/services/strategy/service_test.go?\n    at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:31:38.571Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6. Did you mean /Users/joon/projects/twoj/zoro/dibs/ferumv6/services/strategy/types_test.go?\n    at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:31:39.048Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6. Did you mean /Users/joon/projects/twoj/zoro/dibs/ferumv6/services/strategy/errors_test.go?\n    at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:31:39.156Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/joon/projects/twoj/zoro/dibs/ferumv6.\n    at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:32:28.067Z"},{"error":"Error\n    at call (/$bunfs/root/src/entrypoints/cli.js:1466:6033)\n    at processTicksAndRejections (unknown:7:39)","timestamp":"2026-04-15T07:59:24.208Z"},{"error":"MaxFileReadTokenExceededError: File content (33985 tokens) exceeds maximum allowed tokens (25000). 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 Sn6 (/$bunfs/root/src/entrypoints/cli.js:1457:8064)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T08:00:16.029Z"},{"error":"MaxFileReadTokenExceededError: File content (33985 tokens) exceeds maximum allowed tokens (25000). 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 Sn6 (/$bunfs/root/src/entrypoints/cli.js:1457:8064)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T08:02:41.219Z"},{"error":"Error: Cannot resume agent abbb49c4a556dc6e3: it is still running. Use TaskStop to stop it first, or wait for it to complete.\n    at call (/$bunfs/root/src/entrypoints/cli.js:2995:10007)\n    at XCK (/$bunfs/root/src/entrypoints/cli.js:3909:15032)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T08:02:44.335Z"},{"error":"Error: Cannot resume agent aceedb424764dc87d: it is still running. Use TaskStop to stop it first, or wait for it to complete.\n    at call (/$bunfs/root/src/entrypoints/cli.js:2995:10007)\n    at XCK (/$bunfs/root/src/entrypoints/cli.js:3909:15032)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T08:02:45.042Z"},{"error":"MaxFileReadTokenExceededError: File content (33985 tokens) exceeds maximum allowed tokens (25000). 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 Sn6 (/$bunf…

Note: Content was truncated.

extent analysis

TL;DR

The most likely fix is to address the "MaxFileReadTokenExceededError" by using offset and limit parameters to read specific portions of the file.

Guidance

  • Check the file reading logic to ensure it's not trying to read the entire file at once, which is causing the "MaxFileReadTokenExceededError".
  • Use offset and limit parameters to read specific portions of the file, as suggested in the error message.
  • Verify that the current working directory is correct and the file exists in the expected location.
  • Consider stopping running agents before trying to resume them, as indicated by the "Cannot resume agent" errors.

Example

No specific code snippet can be provided without more context, but the error message suggests modifying the file reading function to include offset and limit parameters, e.g., readFile(offset: 0, limit: 25000).

Notes

The issue description is truncated, which may limit the accuracy of the suggested fix. Additionally, the errors seem to be related to file reading and agent management, but the root cause may be more complex.

Recommendation

Apply workaround: Use offset and limit parameters to read specific portions of the file to avoid the "MaxFileReadTokenExceededError". This should help mitigate the issue, but further investigation may be needed to address the underlying cause.

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