claude-code - 💡(How to fix) Fix [Bug] Corrupted/Garbled Output Response from Claude API [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#46166Fetched 2026-04-11 06:27:24
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×4cross-referenced ×2commented ×1

Error Message

[{"error":"Error: NON-FATAL: Lock acquisition failed for /<home>.local/share/claude/versions/2.1.100 (expected in multi-process scenarios)\n at Ug$ (/$bunfs/root/src/entrypoints/cli.js:2812:2153)\n at Ht8 (/$bunfs/root/src/entrypoints/cli.js:2812:1233)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T10:02:34.727Z"},{"error":"MaxFileReadTokenExceededError: File content (42110 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 kO7 (/$bunfs/root/src/entrypoints/cli.js:4360:12671)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T10:04:16.442Z"},{"error":"Error: ensureToolResultPairing: repaired missing tool_result blocks (23 -> 23 messages). Message structure: [0] user; [1] assistant(id=msg_014tCbYiT6pn2rwxML3TgTPa, tool_uses=[toolu_012S1JLJt65TvHM7dVcLK5Vj]); [2] user(tool_results=[toolu_012S1JLJt65TvHM7dVcLK5Vj]); [3] assistant(id=msg_01Q9QzUzAZ6pQAPgHKzsirUt, tool_uses=[toolu_019Hm4F15k6CCYy7VNE5w9YR]); [4] user(tool_results=[toolu_019Hm4F15k6CCYy7VNE5w9YR]); [5] assistant(id=msg_01HzodXxaKrSWXD8sQcBM752, tool_uses=[toolu_012uTW6eivbYjftBgh64KpXg]); [6] user(tool_results=[toolu_012uTW6eivbYjftBgh64KpXg]); [7] assistant(id=msg_01MVeGcxxQxXxWoQnzfLrBi1, tool_uses=[toolu_01CTKxkH6XTatc9o6CTzF1bD]); [8] user(tool_results=[toolu_01CTKxkH6XTatc9o6CTzF1bD]); [9] assistant(id=msg_019V42YHhKkw8dPLn8zefGfq, tool_uses=[toolu_01NM17s2Kr1STJdizMgBu9Nf]); [10] user(tool_results=[toolu_01NM17s2Kr1STJdizMgBu9Nf]); [11] assistant(id=msg_01UVGzqF3PQwbJqPmieStMYq, tool_uses=[toolu_01A3JtdZdgXs3irJzszTbUXv]); [12] user(tool_results=[toolu_01A3JtdZdgXs3irJzszTbUXv]); [13] assistant(id=msg_01A64y5M3Eo8pxBgBNX37EsM, tool_uses=[]); [14] user; [15] assistant(id=msg_014hGJcTq51HN42ionqGmKsf, tool_uses=[toolu_01Vc4ViruobvE8HttAaWUsLG]); [16] user(tool_results=[toolu_01Vc4ViruobvE8HttAaWUsLG]); [17] assistant(id=msg_01V6pcurs4hZuWT7pPwNcm3C, tool_uses=[]); [18] user; [19] assistant(id=msg_01RCDXDqfZFS2RGKio9phfR2, tool_uses=[toolu_01PqENipYG7ze8491UqQeCZQ]); [20] user(tool_results=[toolu_01PqENipYG7ze8491UqQeCZQ]); [21] assistant(id=msg_01S5UYa8DJGerbJFESmdhYd9, tool_uses=[toolu_01LLCQ4DMovwZjSDzRwRx2rg]); [22] user\n at VD7 (/$bunfs/root/src/entrypoints/cli.js:4913:9379)\n at mx7 (/$bunfs/root/src/entrypoints/cli.js:7820:12047)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T10:10:26.235Z"},{"error":"MaxFileReadTokenExceededError: File content (42026 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 kO7 (/$bunfs/root/src/entrypoints/cli.js:4360:12671)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T10:10:33.586Z"},{"error":"MaxFileReadTokenExceededError: File content (19550 tokens) exceeds maximum allowe…

Code Example

si

  nuur_,n
  i.Ation
  /6iiing
  ,Ac18,Es) ,                ies (.,Pals) i(, ie2(461,., !1_1, ies (1/4,8
  2164.1_1211
  /; (11

  Ingh Cos221_1.1 (C:6_5Ing6)2/1_
  8 In, 2i_21ICI. Ing1
  61
  12 I,
  A  In22 In2 C ]2 Ki2 I
  \ I, 1
   ( C
   C_1
   C_
   C_ J
   Ya n, i, i, i
  , 5, . and,,,., ( (, Eos Ia ( (, C, ti:,, as,2 A2 (, Cos 0/:2,,,A:/)/:,: C / M, n,,,,., ri, Ding tr tri,, iz2.,,ri (ri, ( V
  /,,,,,:,,,,, 6M -:, .: 1.,, 1 ,.., 1, C, . I,,., )i ,,.,. 1 K, 1 ",,, 1,A., 1,,,,,, . ]i,,, C,.,,:,.,. , , 1. n .i ri as,:.2
  1_6., IC _ 7 C1 E1, 1,, 1 C1, . , ( n . , p ..,. n ,ni., , i,, , 1 1, j:,. , ri1 as ni, ,,A, ,. 1 1 ,Ini .C, 1. . n . 1 :. A.
  1. , S n ., 1, . .:. i . 1., . 1 n. . n .. n, . , . ri ,. E, ( : :, ...C ...i :, . ., ( . 1 :., ,,., . ( ..C ( ( 1 ( ., 2., .
  1 ., ni n, . :. ni ..Ao: .i ni. n ..C 2 . C . C, . ni. ( . 1 ( ., E, ., ,E E E. .. 1 ..6 \ G Ac2 . 1 1 n A : ..E ., E. E. E.
  ., ri. ., E ( 2 E. N ,. ", ( ( 1 . A, E. ( ., E n N. ( .( 1, ni. ] -, ni- . E -. r E 0 r , ,, .. n, p .. (, , r n .. i, n, E 1
   1 E n 1 i, 1  r. E. nE, 1 _ nr n ( r r r nir, 0, r r n r A (, ri rir (, r i r r r r 0 ( r1 r, r2 -A 0 r ,, M E E nir E (r r
  n, ]Eri Ca ] n r. 2  nCr n A _A rA. r ] [ ] ], ] C nE _A] rE C re ni, 2 r ] ] ].Arinin.] rS]e i _ (Ce,],e

---

[{"error":"Error: NON-FATAL: Lock acquisition failed for /<home>.local/share/claude/versions/2.1.100 (expected in multi-process scenarios)\n    at Ug$ (/$bunfs/root/src/entrypoints/cli.js:2812:2153)\n    at Ht8 (/$bunfs/root/src/entrypoints/cli.js:2812:1233)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T10:02:34.727Z"},{"error":"MaxFileReadTokenExceededError: File content (42110 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 kO7 (/$bunfs/root/src/entrypoints/cli.js:4360:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T10:04:16.442Z"},{"error":"Error: ensureToolResultPairing: repaired missing tool_result blocks (23 -> 23 messages). Message structure: [0] user; [1] assistant(id=msg_014tCbYiT6pn2rwxML3TgTPa, tool_uses=[toolu_012S1JLJt65TvHM7dVcLK5Vj]); [2] user(tool_results=[toolu_012S1JLJt65TvHM7dVcLK5Vj]); [3] assistant(id=msg_01Q9QzUzAZ6pQAPgHKzsirUt, tool_uses=[toolu_019Hm4F15k6CCYy7VNE5w9YR]); [4] user(tool_results=[toolu_019Hm4F15k6CCYy7VNE5w9YR]); [5] assistant(id=msg_01HzodXxaKrSWXD8sQcBM752, tool_uses=[toolu_012uTW6eivbYjftBgh64KpXg]); [6] user(tool_results=[toolu_012uTW6eivbYjftBgh64KpXg]); [7] assistant(id=msg_01MVeGcxxQxXxWoQnzfLrBi1, tool_uses=[toolu_01CTKxkH6XTatc9o6CTzF1bD]); [8] user(tool_results=[toolu_01CTKxkH6XTatc9o6CTzF1bD]); [9] assistant(id=msg_019V42YHhKkw8dPLn8zefGfq, tool_uses=[toolu_01NM17s2Kr1STJdizMgBu9Nf]); [10] user(tool_results=[toolu_01NM17s2Kr1STJdizMgBu9Nf]); [11] assistant(id=msg_01UVGzqF3PQwbJqPmieStMYq, tool_uses=[toolu_01A3JtdZdgXs3irJzszTbUXv]); [12] user(tool_results=[toolu_01A3JtdZdgXs3irJzszTbUXv]); [13] assistant(id=msg_01A64y5M3Eo8pxBgBNX37EsM, tool_uses=[]); [14] user; [15] assistant(id=msg_014hGJcTq51HN42ionqGmKsf, tool_uses=[toolu_01Vc4ViruobvE8HttAaWUsLG]); [16] user(tool_results=[toolu_01Vc4ViruobvE8HttAaWUsLG]); [17] assistant(id=msg_01V6pcurs4hZuWT7pPwNcm3C, tool_uses=[]); [18] user; [19] assistant(id=msg_01RCDXDqfZFS2RGKio9phfR2, tool_uses=[toolu_01PqENipYG7ze8491UqQeCZQ]); [20] user(tool_results=[toolu_01PqENipYG7ze8491UqQeCZQ]); [21] assistant(id=msg_01S5UYa8DJGerbJFESmdhYd9, tool_uses=[toolu_01LLCQ4DMovwZjSDzRwRx2rg]); [22] user\n    at VD7 (/$bunfs/root/src/entrypoints/cli.js:4913:9379)\n    at mx7 (/$bunfs/root/src/entrypoints/cli.js:7820:12047)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T10:10:26.235Z"},{"error":"MaxFileReadTokenExceededError: File content (42026 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 kO7 (/$bunfs/root/src/entrypoints/cli.js:4360:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T10:10:33.586Z"},{"error":"MaxFileReadTokenExceededError: File content (19550 tokens) exceeds maximum allowe…
RAW_BUFFERClick to expand / collapse

Bug Description Respuesta totalmente ilegible:

si

  nuur_,n
  i.Ation
  /6iiing
  ,Ac18,Es) ,                ies (.,Pals) i(, ie2(461,., !1_1, ies (1/4,8
  2164.1_1211
  /; (11

  Ingh Cos221_1.1 (C:6_5Ing6)2/1_
  8 In, 2i_21ICI. Ing1
  61
  12 I,
  A  In22 In2 C ]2 Ki2 I
  \ I, 1
   ( C
   C_1
   C_
   C_ J
   Ya n, i, i, i
  , 5, . and,,,., ( (, Eos Ia ( (, C, ti:,, as,2 A2 (, Cos 0/:2,,,A:/)/:,: C / M, n,,,,., ri, Ding tr tri,, iz2.,,ri (ri, ( V
  /,,,,,:,,,,, 6M -:, .: 1.,, 1 ,.., 1, C, . I,,., )i ,,.,. 1 K, 1 ",,, 1,A., 1,,,,,, . ]i,,, C,.,,:,.,. , , 1. n .i ri as,:.2
  1_6., IC _ 7 C1 E1, 1,, 1 C1, . , ( n . , p ..,. n ,ni., , i,, , 1 1, j:,. , ri1 as ni, ,,A, ,. 1 1 ,Ini .C, 1. . n . 1 :. A.
  1. , S n ., 1, . .:. i . 1., . 1 n. . n .. n, . , . ri ,. E, ( : :, ...C ...i :, . ., ( . 1 :., ,,., . ( ..C ( ( 1 ( ., 2., .
  1 ., ni n, . :. ni ..Ao: .i ni. n ..C 2 . C . C, . ni. ( . 1 ( ., E, ., ,E E E. .. 1 ..6 \ G Ac2 . 1 1 n A : ..E ., E. E. E.
  ., ri. ., E ( 2 E. N ,. ", ( ( 1 . A, E. ( ., E n N. ( .( 1, ni. ] -, ni- . E -. r E 0 r , ,, .. n, p .. (, , r n .. i, n, E 1
   1 E n 1 i, 1  r. E. nE, 1 _ nr n ( r r r nir, 0, r r n r A (, ri rir (, r i r r r r 0 ( r1 r, r2 -A 0 r ,, M E E nir E (r r
  n, ]Eri Ca ] n r. 2  nCr n A _A rA. r ] [ ] ], ] C nE _A] rE C re ni, 2 r ] ] ].Arinin.] rS]e i _ (Ce,],e

Environment Info

  • Platform: linux
  • Terminal: ghostty
  • Version: 2.1.100
  • Feedback ID: 1ad0bada-2665-4fd5-a864-6372ad7f3e35

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /<home>.local/share/claude/versions/2.1.100 (expected in multi-process scenarios)\n    at Ug$ (/$bunfs/root/src/entrypoints/cli.js:2812:2153)\n    at Ht8 (/$bunfs/root/src/entrypoints/cli.js:2812:1233)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T10:02:34.727Z"},{"error":"MaxFileReadTokenExceededError: File content (42110 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 kO7 (/$bunfs/root/src/entrypoints/cli.js:4360:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T10:04:16.442Z"},{"error":"Error: ensureToolResultPairing: repaired missing tool_result blocks (23 -> 23 messages). Message structure: [0] user; [1] assistant(id=msg_014tCbYiT6pn2rwxML3TgTPa, tool_uses=[toolu_012S1JLJt65TvHM7dVcLK5Vj]); [2] user(tool_results=[toolu_012S1JLJt65TvHM7dVcLK5Vj]); [3] assistant(id=msg_01Q9QzUzAZ6pQAPgHKzsirUt, tool_uses=[toolu_019Hm4F15k6CCYy7VNE5w9YR]); [4] user(tool_results=[toolu_019Hm4F15k6CCYy7VNE5w9YR]); [5] assistant(id=msg_01HzodXxaKrSWXD8sQcBM752, tool_uses=[toolu_012uTW6eivbYjftBgh64KpXg]); [6] user(tool_results=[toolu_012uTW6eivbYjftBgh64KpXg]); [7] assistant(id=msg_01MVeGcxxQxXxWoQnzfLrBi1, tool_uses=[toolu_01CTKxkH6XTatc9o6CTzF1bD]); [8] user(tool_results=[toolu_01CTKxkH6XTatc9o6CTzF1bD]); [9] assistant(id=msg_019V42YHhKkw8dPLn8zefGfq, tool_uses=[toolu_01NM17s2Kr1STJdizMgBu9Nf]); [10] user(tool_results=[toolu_01NM17s2Kr1STJdizMgBu9Nf]); [11] assistant(id=msg_01UVGzqF3PQwbJqPmieStMYq, tool_uses=[toolu_01A3JtdZdgXs3irJzszTbUXv]); [12] user(tool_results=[toolu_01A3JtdZdgXs3irJzszTbUXv]); [13] assistant(id=msg_01A64y5M3Eo8pxBgBNX37EsM, tool_uses=[]); [14] user; [15] assistant(id=msg_014hGJcTq51HN42ionqGmKsf, tool_uses=[toolu_01Vc4ViruobvE8HttAaWUsLG]); [16] user(tool_results=[toolu_01Vc4ViruobvE8HttAaWUsLG]); [17] assistant(id=msg_01V6pcurs4hZuWT7pPwNcm3C, tool_uses=[]); [18] user; [19] assistant(id=msg_01RCDXDqfZFS2RGKio9phfR2, tool_uses=[toolu_01PqENipYG7ze8491UqQeCZQ]); [20] user(tool_results=[toolu_01PqENipYG7ze8491UqQeCZQ]); [21] assistant(id=msg_01S5UYa8DJGerbJFESmdhYd9, tool_uses=[toolu_01LLCQ4DMovwZjSDzRwRx2rg]); [22] user\n    at VD7 (/$bunfs/root/src/entrypoints/cli.js:4913:9379)\n    at mx7 (/$bunfs/root/src/entrypoints/cli.js:7820:12047)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T10:10:26.235Z"},{"error":"MaxFileReadTokenExceededError: File content (42026 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 kO7 (/$bunfs/root/src/entrypoints/cli.js:4360:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T10:10:33.586Z"},{"error":"MaxFileReadTokenExceededError: File content (19550 tokens) exceeds maximum allowe…

Note: Content was truncated.

extent analysis

TL;DR

The issue can be resolved by addressing the MaxFileReadTokenExceededError and ensuring proper file handling to prevent exceeding the maximum allowed tokens.

Guidance

  • Identify the files being read that exceed the 10000 token limit and modify the code to use offset and limit parameters for reading specific portions of these files.
  • Review the error logs to understand which files are causing the MaxFileReadTokenExceededError and prioritize those for modification.
  • Consider implementing a more efficient file reading mechanism that can handle large files without exceeding the token limit.
  • Check for any circular dependencies or infinite loops in the file reading process that might be contributing to the error.

Example

No specific code example can be provided without more context on the file reading mechanism used in the application. However, the general approach would involve modifying the file reading function to accept offset and limit parameters, like so:

function readFile(filePath, offset, limit) {
  // Implementation to read the file using offset and limit
}

Notes

The provided issue content is truncated, which might limit the ability to provide a comprehensive solution. Additionally, without more details on the application's codebase and the specific requirements for file handling, the guidance is somewhat generalized.

Recommendation

Apply a workaround by modifying the file reading mechanism to handle large files more efficiently, using offset and limit parameters to prevent exceeding the maximum allowed tokens. This approach is recommended because it directly addresses the MaxFileReadTokenExceededError and can be implemented without requiring a full understanding of the application's codebase or waiting for a potential fix in a future version.

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