claude-code - 💡(How to fix) Fix [Bug] Statusline command triggers unexpected file search and premature auto-compact at 160k tokens [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#46904Fetched 2026-04-12 13:30:02
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×3closed ×1commented ×1

Error Message

[{"error":"Error: ripgrep exited with code null\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:528:2814)\n at emit (node:events:98:22)\n at #maybeClose (node:child_process:766:16)\n at #handleOnExit (node:child_process:520:72)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T05:20:43.170Z"},{"error":"RipgrepTimeoutError: Ripgrep search timed out after 20 seconds. The search may have matched files but did not complete in time. Try searching a more specific path or pattern.\n at T (/$bunfs/root/src/entrypoints/cli.js:531:242)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:531:456)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:528:2885)\n at emit (node:events:98:22)\n at #maybeClose (node:child_process:766:16)\n at #handleOnExit (node:child_process:520:72)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T05:20:43.171Z"},{"error":"MaxFileReadTokenExceededError: File content (12234 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T05:44:42.775Z"},{"error":"MaxFileReadTokenExceededError: File content (26387 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T06:53:43.977Z"},{"error":"MaxFileReadTokenExceededError: File content (26858 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T07:08:13.327Z"},{"error":"MaxFileReadTokenExceededError: File content (25589 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T07:08:16.288Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/a.conradty/cases/eg-cc.\n at call (/$bunfs/root/src/entrypoints/cli.js:4458:7632)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T07:17:29.277Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/a.conradty/cases/eg-cc.\n at call (/$bunfs/root/src/entrypoints/cli.js:4458:7632)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T07:17:29.794Z"},{"error":"Error: Request was aborted.\n at BE_ (/$bunfs/root/src/entrypoints/cli.js:1268:12089)\n at next (native:1:11)\n at tm7 (/$bunfs/root/src/entrypoints/cli.js:7918:9109)\n at next (native:1:11)\n at _p7 (/$bunfs/root/src/entrypoints/cli.js:7923:12068)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T07:21:24.310Z"}]

Code Example

[{"error":"Error: ripgrep exited with code null\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:528:2814)\n    at emit (node:events:98:22)\n    at #maybeClose (node:child_process:766:16)\n    at #handleOnExit (node:child_process:520:72)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T05:20:43.170Z"},{"error":"RipgrepTimeoutError: Ripgrep search timed out after 20 seconds. The search may have matched files but did not complete in time. Try searching a more specific path or pattern.\n    at T (/$bunfs/root/src/entrypoints/cli.js:531:242)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:531:456)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:528:2885)\n    at emit (node:events:98:22)\n    at #maybeClose (node:child_process:766:16)\n    at #handleOnExit (node:child_process:520:72)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T05:20:43.171Z"},{"error":"MaxFileReadTokenExceededError: File content (12234 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T05:44:42.775Z"},{"error":"MaxFileReadTokenExceededError: File content (26387 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T06:53:43.977Z"},{"error":"MaxFileReadTokenExceededError: File content (26858 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T07:08:13.327Z"},{"error":"MaxFileReadTokenExceededError: File content (25589 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T07:08:16.288Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/a.conradty/cases/eg-cc.\n    at call (/$bunfs/root/src/entrypoints/cli.js:4458:7632)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T07:17:29.277Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/a.conradty/cases/eg-cc.\n    at call (/$bunfs/root/src/entrypoints/cli.js:4458:7632)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T07:17:29.794Z"},{"error":"Error: Request was aborted.\n    at BE_ (/$bunfs/root/src/entrypoints/cli.js:1268:12089)\n    at next (native:1:11)\n    at tm7 (/$bunfs/root/src/entrypoints/cli.js:7918:9109)\n    at next (native:1:11)\n    at _p7 (/$bunfs/root/src/entrypoints/cli.js:7923:12068)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T07:21:24.310Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description After the token display in the right lower corner just disappeared. I did some quick research and read that I should use /statusline now. So I used that command and the next thing that happended is that claude code searched all my config files without any warning. Then it auto compacted at 160k token (claude max account with opus 1m context model)

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.104
  • Feedback ID: 34ee0846-78f1-4f6f-a8d2-d3b6b4a3a094

Errors

[{"error":"Error: ripgrep exited with code null\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:528:2814)\n    at emit (node:events:98:22)\n    at #maybeClose (node:child_process:766:16)\n    at #handleOnExit (node:child_process:520:72)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T05:20:43.170Z"},{"error":"RipgrepTimeoutError: Ripgrep search timed out after 20 seconds. The search may have matched files but did not complete in time. Try searching a more specific path or pattern.\n    at T (/$bunfs/root/src/entrypoints/cli.js:531:242)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:531:456)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:528:2885)\n    at emit (node:events:98:22)\n    at #maybeClose (node:child_process:766:16)\n    at #handleOnExit (node:child_process:520:72)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T05:20:43.171Z"},{"error":"MaxFileReadTokenExceededError: File content (12234 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T05:44:42.775Z"},{"error":"MaxFileReadTokenExceededError: File content (26387 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T06:53:43.977Z"},{"error":"MaxFileReadTokenExceededError: File content (26858 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T07:08:13.327Z"},{"error":"MaxFileReadTokenExceededError: File content (25589 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T07:08:16.288Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/a.conradty/cases/eg-cc.\n    at call (/$bunfs/root/src/entrypoints/cli.js:4458:7632)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T07:17:29.277Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/a.conradty/cases/eg-cc.\n    at call (/$bunfs/root/src/entrypoints/cli.js:4458:7632)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T07:17:29.794Z"},{"error":"Error: Request was aborted.\n    at BE_ (/$bunfs/root/src/entrypoints/cli.js:1268:12089)\n    at next (native:1:11)\n    at tm7 (/$bunfs/root/src/entrypoints/cli.js:7918:9109)\n    at next (native:1:11)\n    at _p7 (/$bunfs/root/src/entrypoints/cli.js:7923:12068)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T07:21:24.310Z"}]

extent analysis

TL;DR

Use the offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file to avoid exceeding the maximum allowed tokens.

Guidance

  • The errors suggest that the file content exceeds the maximum allowed tokens (10000), so try to limit the search to specific portions of the file.
  • Use the offset and limit parameters to control the amount of data being read.
  • Consider searching for specific content instead of reading the whole file to reduce the token count.
  • Verify that the file exists and the current working directory is correct to avoid "File does not exist" errors.

Example

No code example is provided as the issue does not contain sufficient information about the code being used.

Notes

The issue seems to be related to the claude code searching all config files without warning, which may be a separate issue from the token limit errors. However, addressing the token limit errors may help resolve the overall issue.

Recommendation

Apply workaround: Use the offset and limit parameters to control the amount of data being read, as this directly addresses the token limit errors and may help resolve the overall 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