claude-code - 💡(How to fix) Fix [Bug] Duplicated output during inference [4 comments, 3 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#51766Fetched 2026-04-22 07:53:25
View on GitHub
Comments
4
Participants
3
Timeline
5
Reactions
1
Author
Timeline (top)
commented ×4cross-referenced ×1

Error Message

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/byronluk/.local/share/claude/versions/2.1.116 (expected in multi-process scenarios)\n at jl_ (/$bunfs/root/src/entrypoints/cli.js:2752:2177)\n at B88 (/$bunfs/root/src/entrypoints/cli.js:2752:1257)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T23:40:01.260Z"},{"error":"FileTooLargeError: File content (842.2KB) exceeds maximum allowed size (256KB). 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 C4H (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T23:41:54.114Z"},{"error":"MaxFileReadTokenExceededError: File content (220183 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 X27 (/$bunfs/root/src/entrypoints/cli.js:4732:12656)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T23:41:59.452Z"}]

Code Example

Finding 1

Finding 2

Finding 3

Finding 2

Finding 3

Finding 4

---

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/byronluk/.local/share/claude/versions/2.1.116 (expected in multi-process scenarios)\n    at jl_ (/$bunfs/root/src/entrypoints/cli.js:2752:2177)\n    at B88 (/$bunfs/root/src/entrypoints/cli.js:2752:1257)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T23:40:01.260Z"},{"error":"FileTooLargeError: File content (842.2KB) exceeds maximum allowed size (256KB). 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 C4H (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T23:41:54.114Z"},{"error":"MaxFileReadTokenExceededError: File content (220183 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 X27 (/$bunfs/root/src/entrypoints/cli.js:4732:12656)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T23:41:59.452Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description I'm seeing an inference bug (or maybe a claude code bug) where I'm seeing duplicated output. This is like the 5th time today where I'm observing output that is repeated.

e.g.

Finding 1

Finding 2

Finding 3

Finding 2

Finding 3

Finding 4

I'll see the exact same blocks duplicated (finding 2 & 3) repeat in the list. I'm not sure if this is a claude code bug or an inference bug resulting in increased output tokens?

Environment Info

  • Platform: darwin
  • Terminal: Superset
  • Version: 2.1.116
  • Feedback ID: ae7748fc-e6c1-4a05-8cb1-572be022c5cd

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/byronluk/.local/share/claude/versions/2.1.116 (expected in multi-process scenarios)\n    at jl_ (/$bunfs/root/src/entrypoints/cli.js:2752:2177)\n    at B88 (/$bunfs/root/src/entrypoints/cli.js:2752:1257)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T23:40:01.260Z"},{"error":"FileTooLargeError: File content (842.2KB) exceeds maximum allowed size (256KB). 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 C4H (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T23:41:54.114Z"},{"error":"MaxFileReadTokenExceededError: File content (220183 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 X27 (/$bunfs/root/src/entrypoints/cli.js:4732:12656)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-21T23:41:59.452Z"}]

extent analysis

TL;DR

The issue of duplicated output may be related to the errors encountered, particularly the MaxFileReadTokenExceededError, which suggests that the file content exceeds the maximum allowed tokens, potentially causing the duplication.

Guidance

  • Review the error logs to understand the sequence of events leading to the duplicated output, focusing on the MaxFileReadTokenExceededError and how it might influence the output.
  • Consider implementing pagination or limiting the file read tokens to prevent the MaxFileReadTokenExceededError, potentially resolving the duplication issue.
  • Investigate if the Lock acquisition failed error is related to the multi-process scenario and if it could be contributing to the duplicated output by causing processes to overlap or repeat tasks.
  • Check if the FileTooLargeError is relevant to the issue at hand, as it might indicate a need to handle large files differently to avoid errors that could lead to duplicated output.

Example

No specific code example can be provided without more context on how the output is generated, but adjusting file reading to use offset and limit parameters as suggested by the FileTooLargeError could look something like adjusting a function call to include these parameters, though the exact implementation depends on the actual codebase.

Notes

The provided errors suggest issues with file handling and token limits, which might not directly cause duplicated output but could contribute to an unstable environment where such issues arise. The Lock acquisition failed error hints at potential concurrency issues.

Recommendation

Apply a workaround by adjusting file reading parameters (like offset and limit) to stay within the token limits and handle large files more efficiently, as directly implied by the error messages. This approach is chosen because it directly addresses errors mentioned in the issue and could mitigate the conditions leading to duplicated output.

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] Duplicated output during inference [4 comments, 3 participants]