claude-code - 💡(How to fix) Fix [Bug] Agent performance degradation after instruction violation feedback [1 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#52115Fetched 2026-04-23 07:36:15
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

Error Message

[{"error":"FileTooLargeError: File content (269.8KB) 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 nKH (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:00:42.654Z"},{"error":"FileTooLargeError: File content (269.8KB) 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 nKH (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:00:47.417Z"},{"error":"MaxFileReadTokenExceededError: File content (67766 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 nj7 (/$bunfs/root/src/entrypoints/cli.js:4723:12550)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:00:51.449Z"},{"error":"FileTooLargeError: File content (269.8KB) 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 nKH (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:00:52.012Z"},{"error":"FileTooLargeError: File content (269.8KB) 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 nKH (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:08:39.660Z"},{"error":"MaxFileReadTokenExceededError: File content (63197 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 nj7 (/$bunfs/root/src/entrypoints/cli.js:4723:12550)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:10:49.307Z"},{"error":"MaxFileReadTokenExceededError: File content (45396 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 nj7 (/$bunfs/root/src/entrypoints/cli.js:4723:12550)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:17:38.354Z"},{"error":"Error: EISDIR: illegal operation on a directory, read '/Users/dwellman/workspace/unna/web/client/src/components'\n at nKH (/$bunfs/root/src/entrypoints/cli.js:1564:144)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:18:09.437Z"},{"error":"FileTooLargeError: File content (270.6KB) 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 nKH (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T19:32:20.332Z"},{"error":"FileTooLargeError: File content (272.4KB) 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 nKH (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T19:53:23.575Z"},{"error":"Error: Request was aborted.\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T20:10:27.254Z"}]

Code Example

[{"error":"FileTooLargeError: File content (269.8KB) 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 nKH (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:00:42.654Z"},{"error":"FileTooLargeError: File content (269.8KB) 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 nKH (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:00:47.417Z"},{"error":"MaxFileReadTokenExceededError: File content (67766 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 nj7 (/$bunfs/root/src/entrypoints/cli.js:4723:12550)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:00:51.449Z"},{"error":"FileTooLargeError: File content (269.8KB) 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 nKH (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:00:52.012Z"},{"error":"FileTooLargeError: File content (269.8KB) 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 nKH (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:08:39.660Z"},{"error":"MaxFileReadTokenExceededError: File content (63197 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 nj7 (/$bunfs/root/src/entrypoints/cli.js:4723:12550)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:10:49.307Z"},{"error":"MaxFileReadTokenExceededError: File content (45396 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 nj7 (/$bunfs/root/src/entrypoints/cli.js:4723:12550)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:17:38.354Z"},{"error":"Error: EISDIR: illegal operation on a directory, read '/Users/dwellman/workspace/unna/web/client/src/components'\n    at nKH (/$bunfs/root/src/entrypoints/cli.js:1564:144)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:18:09.437Z"},{"error":"FileTooLargeError: File content (270.6KB) 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 nKH (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T19:32:20.332Z"},{"error":"FileTooLargeError: File content (272.4KB) 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 nKH (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T19:53:23.575Z"},{"error":"Error: Request was aborted.\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T20:10:27.254Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description Really bad interactions with this agent. I presented proof to the agent that it was not following intructions and then I noticed a clear decline in performance. I wanted to long to shut that one down in pace of a fresh agent and now there is more work to do. To unwind the mess and then finish the task. I lost ground on this one.

Environment Info

  • Platform: darwin
  • Terminal: WarpTerminal
  • Version: 2.1.114
  • Feedback ID: 037cf262-6ef2-4967-a035-e7c144ca5c1f

Errors

[{"error":"FileTooLargeError: File content (269.8KB) 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 nKH (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:00:42.654Z"},{"error":"FileTooLargeError: File content (269.8KB) 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 nKH (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:00:47.417Z"},{"error":"MaxFileReadTokenExceededError: File content (67766 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 nj7 (/$bunfs/root/src/entrypoints/cli.js:4723:12550)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:00:51.449Z"},{"error":"FileTooLargeError: File content (269.8KB) 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 nKH (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:00:52.012Z"},{"error":"FileTooLargeError: File content (269.8KB) 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 nKH (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:08:39.660Z"},{"error":"MaxFileReadTokenExceededError: File content (63197 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 nj7 (/$bunfs/root/src/entrypoints/cli.js:4723:12550)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:10:49.307Z"},{"error":"MaxFileReadTokenExceededError: File content (45396 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 nj7 (/$bunfs/root/src/entrypoints/cli.js:4723:12550)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:17:38.354Z"},{"error":"Error: EISDIR: illegal operation on a directory, read '/Users/dwellman/workspace/unna/web/client/src/components'\n    at nKH (/$bunfs/root/src/entrypoints/cli.js:1564:144)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T14:18:09.437Z"},{"error":"FileTooLargeError: File content (270.6KB) 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 nKH (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T19:32:20.332Z"},{"error":"FileTooLargeError: File content (272.4KB) 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 nKH (/$bunfs/root/src/entrypoints/cli.js:1564:270)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T19:53:23.575Z"},{"error":"Error: Request was aborted.\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-22T20:10:27.254Z"}]

extent analysis

TL;DR

Use offset and limit parameters to read specific portions of the file instead of reading the whole file to avoid FileTooLargeError and MaxFileReadTokenExceededError.

Guidance

  • Check the file size and token count before attempting to read it to ensure it's within the allowed limits.
  • Use the offset and limit parameters to read specific portions of the file, as suggested in the error messages.
  • Verify that the file is not a directory, as indicated by the EISDIR error, and adjust the file path accordingly.
  • Consider implementing error handling to catch and handle FileTooLargeError and MaxFileReadTokenExceededError exceptions.

Example

No code example is provided as the issue does not specify the programming language or the code that's causing the error.

Notes

The errors suggest that the file being read is too large or contains too many tokens, exceeding the maximum allowed size or token count. The solution involves using offset and limit parameters to read specific portions of the file.

Recommendation

Apply workaround: Use offset and limit parameters to read specific portions of the file. This approach allows for reading large files without exceeding the maximum allowed size or token count, and it's a straightforward solution based on the error messages provided.

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