claude-code - 💡(How to fix) Fix [Bug] Excessive token consumption in Claude Code requests [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#50359Fetched 2026-04-19 15:22:01
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Error Message

[{"error":"Error: rg --files exited 2\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:681:84)\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-18T01:10:51.288Z"},{"error":"Error: File does not exist. Note: your current working directory is /var/www/twentis/twentis-server.\n at call (/$bunfs/root/src/entrypoints/cli.js:4729:7630)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T01:32:47.561Z"},{"error":"Error: LSP server plugin:typescript-lsp:typescript failed to start: Executable not found in $PATH: "typescript-language-server"\n at start (/$bunfs/root/src/entrypoints/cli.js:3158:22348)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T02:19:34.795Z"},{"error":"Error: Executable not found in $PATH: "typescript-language-server"\n at spawn (unknown)\n at spawn (node:child_process:667:35)\n at spawn (node:child_process:14:39)\n at start (/$bunfs/root/src/entrypoints/cli.js:3158:20884)\n at O (/$bunfs/root/src/entrypoints/cli.js:3158:24867)\n at Y (/$bunfs/root/src/entrypoints/cli.js:3158:30015)\n at M (/$bunfs/root/src/entrypoints/cli.js:3158:30352)\n at D (/$bunfs/root/src/entrypoints/cli.js:3158:30909)\n at call (/$bunfs/root/src/entrypoints/cli.js:4776:1378)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T02:19:34.796Z"},{"error":"Error: Failed to start LSP server for file /var/www/twentis/twentis-server/assets/entrypoints/admin.js: Executable not found in $PATH: "typescript-language-server"\n at Y (/$bunfs/root/src/entrypoints/cli.js:3158:30041)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T02:19:34.796Z"},{"error":"Error: Executable not found in $PATH: "typescript-language-server"\n at spawn (unknown)\n at spawn (node:child_process:667:35)\n at spawn (node:child_process:14:39)\n at start (/$bunfs/root/src/entrypoints/cli.js:3158:20884)\n at O (/$bunfs/root/src/entrypoints/cli.js:3158:24867)\n at Y (/$bunfs/root/src/entrypoints/cli.js:3158:30015)\n at M (/$bunfs/root/src/entrypoints/cli.js:3158:30352)\n at D (/$bunfs/root/src/entrypoints/cli.js:3158:30909)\n at call (/$bunfs/root/src/entrypoints/cli.js:4776:1378)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T02:19:34.796Z"},{"error":"Error: Error normalizing tool input: ZodError: [\n {\n "expected": "string",\n "code": "invalid_type",\n "path": [\n "old_string"\n ],\n "message": "Invalid input: expected string, received undefined"\n },\n {\n "expected": "string",\n "code": "invalid_type",\n "path": [\n "new_string"\n ],\n "message": "Invalid input: expected string, received undefined"\n }\n]\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:5007:1005)\n at map (native:1:11)\n at p4$ (/$bunfs/root/src/entrypoints/cli.js:5007:556)\n at AU7 (/$bunfs/root/src/entrypoints/cli.js:8061:8836)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T02:36:33.084Z"}]

Code Example

[{"error":"Error: rg --files exited 2\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:681:84)\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-18T01:10:51.288Z"},{"error":"Error: File does not exist. Note: your current working directory is /var/www/twentis/twentis-server.\n    at call (/$bunfs/root/src/entrypoints/cli.js:4729:7630)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T01:32:47.561Z"},{"error":"Error: LSP server plugin:typescript-lsp:typescript failed to start: Executable not found in $PATH: \"typescript-language-server\"\n    at start (/$bunfs/root/src/entrypoints/cli.js:3158:22348)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T02:19:34.795Z"},{"error":"Error: Executable not found in $PATH: \"typescript-language-server\"\n    at spawn (unknown)\n    at spawn (node:child_process:667:35)\n    at spawn (node:child_process:14:39)\n    at start (/$bunfs/root/src/entrypoints/cli.js:3158:20884)\n    at O (/$bunfs/root/src/entrypoints/cli.js:3158:24867)\n    at Y (/$bunfs/root/src/entrypoints/cli.js:3158:30015)\n    at M (/$bunfs/root/src/entrypoints/cli.js:3158:30352)\n    at D (/$bunfs/root/src/entrypoints/cli.js:3158:30909)\n    at call (/$bunfs/root/src/entrypoints/cli.js:4776:1378)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T02:19:34.796Z"},{"error":"Error: Failed to start LSP server for file /var/www/twentis/twentis-server/assets/entrypoints/admin.js: Executable not found in $PATH: \"typescript-language-server\"\n    at Y (/$bunfs/root/src/entrypoints/cli.js:3158:30041)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T02:19:34.796Z"},{"error":"Error: Executable not found in $PATH: \"typescript-language-server\"\n    at spawn (unknown)\n    at spawn (node:child_process:667:35)\n    at spawn (node:child_process:14:39)\n    at start (/$bunfs/root/src/entrypoints/cli.js:3158:20884)\n    at O (/$bunfs/root/src/entrypoints/cli.js:3158:24867)\n    at Y (/$bunfs/root/src/entrypoints/cli.js:3158:30015)\n    at M (/$bunfs/root/src/entrypoints/cli.js:3158:30352)\n    at D (/$bunfs/root/src/entrypoints/cli.js:3158:30909)\n    at call (/$bunfs/root/src/entrypoints/cli.js:4776:1378)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T02:19:34.796Z"},{"error":"Error: Error normalizing tool input: ZodError: [\n  {\n    \"expected\": \"string\",\n    \"code\": \"invalid_type\",\n    \"path\": [\n      \"old_string\"\n    ],\n    \"message\": \"Invalid input: expected string, received undefined\"\n  },\n  {\n    \"expected\": \"string\",\n    \"code\": \"invalid_type\",\n    \"path\": [\n      \"new_string\"\n    ],\n    \"message\": \"Invalid input: expected string, received undefined\"\n  }\n]\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:5007:1005)\n    at map (native:1:11)\n    at p4$ (/$bunfs/root/src/entrypoints/cli.js:5007:556)\n    at AU7 (/$bunfs/root/src/entrypoints/cli.js:8061:8836)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T02:36:33.084Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description I have an issue with Opus 4.7 - the token usage in Claude Code has increased completely unreasonably with this model. I was on the MAX 5x plan and it was enough for me 90% of the time when I was coding and everything worked great. Occasionally it bothered me that I hit the limit, so I switched to MAX 20x and most of the time I was at 30-40% weekly usage right before the reset, I never hit the daily limit, the maximum was 50% when I was working on 3 projects in parallel intensively.

Now after three days I'm at 25% of the weekly limit and I'm regularly hitting over 50% of the daily limit, and I'm only working on two projects less intensively.

Environment Info

  • Platform: linux
  • Terminal: WarpTerminal
  • Version: 2.1.112
  • Feedback ID: e1fbef6b-f0fb-4b96-9b97-7269f02eb174

Errors

[{"error":"Error: rg --files exited 2\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:681:84)\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-18T01:10:51.288Z"},{"error":"Error: File does not exist. Note: your current working directory is /var/www/twentis/twentis-server.\n    at call (/$bunfs/root/src/entrypoints/cli.js:4729:7630)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T01:32:47.561Z"},{"error":"Error: LSP server plugin:typescript-lsp:typescript failed to start: Executable not found in $PATH: \"typescript-language-server\"\n    at start (/$bunfs/root/src/entrypoints/cli.js:3158:22348)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T02:19:34.795Z"},{"error":"Error: Executable not found in $PATH: \"typescript-language-server\"\n    at spawn (unknown)\n    at spawn (node:child_process:667:35)\n    at spawn (node:child_process:14:39)\n    at start (/$bunfs/root/src/entrypoints/cli.js:3158:20884)\n    at O (/$bunfs/root/src/entrypoints/cli.js:3158:24867)\n    at Y (/$bunfs/root/src/entrypoints/cli.js:3158:30015)\n    at M (/$bunfs/root/src/entrypoints/cli.js:3158:30352)\n    at D (/$bunfs/root/src/entrypoints/cli.js:3158:30909)\n    at call (/$bunfs/root/src/entrypoints/cli.js:4776:1378)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T02:19:34.796Z"},{"error":"Error: Failed to start LSP server for file /var/www/twentis/twentis-server/assets/entrypoints/admin.js: Executable not found in $PATH: \"typescript-language-server\"\n    at Y (/$bunfs/root/src/entrypoints/cli.js:3158:30041)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T02:19:34.796Z"},{"error":"Error: Executable not found in $PATH: \"typescript-language-server\"\n    at spawn (unknown)\n    at spawn (node:child_process:667:35)\n    at spawn (node:child_process:14:39)\n    at start (/$bunfs/root/src/entrypoints/cli.js:3158:20884)\n    at O (/$bunfs/root/src/entrypoints/cli.js:3158:24867)\n    at Y (/$bunfs/root/src/entrypoints/cli.js:3158:30015)\n    at M (/$bunfs/root/src/entrypoints/cli.js:3158:30352)\n    at D (/$bunfs/root/src/entrypoints/cli.js:3158:30909)\n    at call (/$bunfs/root/src/entrypoints/cli.js:4776:1378)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T02:19:34.796Z"},{"error":"Error: Error normalizing tool input: ZodError: [\n  {\n    \"expected\": \"string\",\n    \"code\": \"invalid_type\",\n    \"path\": [\n      \"old_string\"\n    ],\n    \"message\": \"Invalid input: expected string, received undefined\"\n  },\n  {\n    \"expected\": \"string\",\n    \"code\": \"invalid_type\",\n    \"path\": [\n      \"new_string\"\n    ],\n    \"message\": \"Invalid input: expected string, received undefined\"\n  }\n]\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:5007:1005)\n    at map (native:1:11)\n    at p4$ (/$bunfs/root/src/entrypoints/cli.js:5007:556)\n    at AU7 (/$bunfs/root/src/entrypoints/cli.js:8061:8836)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-18T02:36:33.084Z"}]

extent analysis

TL;DR

The issue is likely related to the increased token usage in Opus 4.7, and a potential workaround could be to investigate and optimize the usage of language server plugins, such as typescript-language-server.

Guidance

  • Investigate the errors related to typescript-language-server and ensure it is properly installed and configured.
  • Review the code and plugins used in the projects to identify potential causes of increased token usage.
  • Check the Opus 4.7 documentation for any changes or updates that may affect token usage.
  • Consider reaching out to the Opus support team for further assistance with optimizing token usage.

Example

No specific code snippet can be provided without more context, but ensuring the typescript-language-server is installed and configured correctly is a good starting point. For example, you can check if the server is installed by running typescript-language-server --version in your terminal.

Notes

The issue may be related to changes in Opus 4.7 or the projects being worked on, and further investigation is needed to determine the root cause. The errors provided suggest issues with language server plugins and potential configuration problems.

Recommendation

Apply a workaround by investigating and optimizing the usage of language server plugins, such as typescript-language-server, to reduce token usage. This is recommended because the issue is likely related to the increased token usage, and optimizing plugin usage may help mitigate the problem.

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