claude-code - 💡(How to fix) Fix [Bug] Anthropic API: Excessive token consumption on initial prompt and simple continuations [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#56136Fetched 2026-05-05 05:57:16
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4

Error Message

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/kt/.local/share/claude/versions/2.1.126 (expected in multi-process scenarios)\n at r86 (/$bunfs/root/src/entrypoints/cli.js:2768:2177)\n at HD8 (/$bunfs/root/src/entrypoints/cli.js:2768:1257)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T21:29:24.122Z"}]

Code Example

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/kt/.local/share/claude/versions/2.1.126 (expected in multi-process scenarios)\n    at r86 (/$bunfs/root/src/entrypoints/cli.js:2768:2177)\n    at HD8 (/$bunfs/root/src/entrypoints/cli.js:2768:1257)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T21:29:24.122Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description I just noticed the usage percentages today. I’ve been facing this same problem for the last two weeks, but I hadn't paid close attention to the details until now. Today, I saw that the very first prompt—simply typing 'continue'—consumes 38% without any actual analysis. To be clear, I cleared all context beforehand; the session started from zero. Once it actually begins analyzing, each activity consumes about 2% and starts adding up quickly. I am paying $200 for Opus 4.7, and there is definitely a leakage somewhere. I hope someone looks into this and fixes it as soon as possible.

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.1.126
  • Feedback ID: f6e5f2b8-4a58-49b1-838c-076f648f873b

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/kt/.local/share/claude/versions/2.1.126 (expected in multi-process scenarios)\n    at r86 (/$bunfs/root/src/entrypoints/cli.js:2768:2177)\n    at HD8 (/$bunfs/root/src/entrypoints/cli.js:2768:1257)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T21:29:24.122Z"}]

extent analysis

TL;DR

Investigate the lock acquisition failure error to address the potential resource leakage causing high usage percentages.

Guidance

  • Review the error message indicating a "Lock acquisition failed" error, which might be related to the high usage percentages.
  • Check the file path /Users/kt/.local/share/claude/versions/2.1.126 for any locking issues or permission problems.
  • Consider the "multi-process scenarios" hint in the error message, which could imply a concurrency issue.
  • Verify if the problem persists across different sessions or terminals to isolate the cause.

Example

No code snippet is provided as the issue does not imply a specific code-related fix.

Notes

The provided information suggests a potential issue with resource management or concurrency, but more details about the application's behavior and the Opus 4.7 service might be necessary for a comprehensive solution.

Recommendation

Apply workaround: Investigate and resolve the lock acquisition failure to mitigate the potential leakage, as upgrading to a fixed version is not explicitly implied in the given information.

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