claude-code - 💡(How to fix) Fix [Bug] Claude modifies test input examples instead of using them as-is, causing invalid test validation [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#45159Fetched 2026-04-09 08:11:56
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 /home/tprus/.local/share/claude/versions/2.1.96 (expected in multi-process scenarios)\n at Cg$ (/$bunfs/root/src/entrypoints/cli.js:1888:2153)\n at ni8 (/$bunfs/root/src/entrypoints/cli.js:1888:1233)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T09:43:15.099Z"},{"error":"MaxFileReadTokenExceededError: File content (17396 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 Zz7 (/$bunfs/root/src/entrypoints/cli.js:4307:13191)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T09:46:07.546Z"},{"error":"MaxFileReadTokenExceededError: File content (12876 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 Zz7 (/$bunfs/root/src/entrypoints/cli.js:4307:13191)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T09:46:15.097Z"},{"error":"MaxFileReadTokenExceededError: File content (27009 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 Zz7 (/$bunfs/root/src/entrypoints/cli.js:4307:13191)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T09:46:31.415Z"},{"error":"Error: File does not exist. Note: your current working directory is /home/tprus/IdeaProjects/backend-v4.\n at call (/$bunfs/root/src/entrypoints/cli.js:4316:7616)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T09:47:20.791Z"},{"error":"Error: Request was aborted.\n at sh$ (/$bunfs/root/src/entrypoints/cli.js:1243:11929)\n at next (native:1:11)\n at vC7 (/$bunfs/root/src/entrypoints/cli.js:7775:9035)\n at next (native:1:11)\n at VC7 (/$bunfs/root/src/entrypoints/cli.js:7780:11451)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T11:17:06.721Z"}]

Code Example

[{"error":"Error: NON-FATAL: Lock acquisition failed for /home/tprus/.local/share/claude/versions/2.1.96 (expected in multi-process scenarios)\n    at Cg$ (/$bunfs/root/src/entrypoints/cli.js:1888:2153)\n    at ni8 (/$bunfs/root/src/entrypoints/cli.js:1888:1233)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T09:43:15.099Z"},{"error":"MaxFileReadTokenExceededError: File content (17396 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 Zz7 (/$bunfs/root/src/entrypoints/cli.js:4307:13191)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T09:46:07.546Z"},{"error":"MaxFileReadTokenExceededError: File content (12876 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 Zz7 (/$bunfs/root/src/entrypoints/cli.js:4307:13191)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T09:46:15.097Z"},{"error":"MaxFileReadTokenExceededError: File content (27009 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 Zz7 (/$bunfs/root/src/entrypoints/cli.js:4307:13191)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T09:46:31.415Z"},{"error":"Error: File does not exist. Note: your current working directory is /home/tprus/IdeaProjects/backend-v4.\n    at call (/$bunfs/root/src/entrypoints/cli.js:4316:7616)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T09:47:20.791Z"},{"error":"Error: Request was aborted.\n    at sh$ (/$bunfs/root/src/entrypoints/cli.js:1243:11929)\n    at next (native:1:11)\n    at vC7 (/$bunfs/root/src/entrypoints/cli.js:7775:9035)\n    at next (native:1:11)\n    at VC7 (/$bunfs/root/src/entrypoints/cli.js:7780:11451)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T11:17:06.721Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description Claude oszukuje notorycznie, mam wrażenie, że pod tym względem się pogorszył z czasem. Przyklad daje mu kilka exampli złych yamli, żeby napisał testy ktore wykażą, że sa złe, a on pisze testy ktore przechodzą, a potem się okazuje, że on nie użył 1:1 exampli tylko je zmodyfikował.

Environment Info

  • Platform: linux
  • Terminal: pycharm
  • Version: 2.1.96
  • Feedback ID: cf74af93-2024-45c8-b52b-299a1106ab28

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /home/tprus/.local/share/claude/versions/2.1.96 (expected in multi-process scenarios)\n    at Cg$ (/$bunfs/root/src/entrypoints/cli.js:1888:2153)\n    at ni8 (/$bunfs/root/src/entrypoints/cli.js:1888:1233)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T09:43:15.099Z"},{"error":"MaxFileReadTokenExceededError: File content (17396 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 Zz7 (/$bunfs/root/src/entrypoints/cli.js:4307:13191)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T09:46:07.546Z"},{"error":"MaxFileReadTokenExceededError: File content (12876 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 Zz7 (/$bunfs/root/src/entrypoints/cli.js:4307:13191)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T09:46:15.097Z"},{"error":"MaxFileReadTokenExceededError: File content (27009 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 Zz7 (/$bunfs/root/src/entrypoints/cli.js:4307:13191)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T09:46:31.415Z"},{"error":"Error: File does not exist. Note: your current working directory is /home/tprus/IdeaProjects/backend-v4.\n    at call (/$bunfs/root/src/entrypoints/cli.js:4316:7616)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T09:47:20.791Z"},{"error":"Error: Request was aborted.\n    at sh$ (/$bunfs/root/src/entrypoints/cli.js:1243:11929)\n    at next (native:1:11)\n    at vC7 (/$bunfs/root/src/entrypoints/cli.js:7775:9035)\n    at next (native:1:11)\n    at VC7 (/$bunfs/root/src/entrypoints/cli.js:7780:11451)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-08T11:17:06.721Z"}]

extent analysis

TL;DR

The issue can be mitigated by using offset and limit parameters to read specific portions of the file instead of reading the whole file, as suggested by the MaxFileReadTokenExceededError messages.

Guidance

  • The MaxFileReadTokenExceededError messages indicate that the file content exceeds the maximum allowed tokens, suggesting that the file is too large to be read in its entirety.
  • To verify this, check the file sizes and token counts for the files being read.
  • Consider modifying the code to use offset and limit parameters to read specific portions of the file, as suggested by the error messages.
  • Additionally, check the current working directory and file paths to ensure they are correct, as indicated by the "File does not exist" error.

Notes

The provided error messages and environment information suggest that the issue is related to file reading and processing, but the exact cause and solution may depend on the specific code and implementation.

Recommendation

Apply workaround: Modify the code to use offset and limit parameters to read specific portions of the file, as this is a direct solution to the MaxFileReadTokenExceededError messages and can 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