claude-code - 💡(How to fix) Fix [Bug] Claude 3.5 Opus 200K context window incorrectly charged as extra usage on Max plan [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#53339Fetched 2026-04-26 05:18:18
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

Error Message

[{"error":"HbH: Failed to install new version of claude: npm error code EBUSY\nnpm error syscall copyfile\nnpm error path C:\Users\malei\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code\node_modules\@anthropic-ai\claude-code-win32-x64\claude.exe\nnpm error dest C:\Users\malei\AppData\Roaming\npm\node_modules\@anthropic-ai\.claude-code-fxXIR0Uj\node_modules\@anthropic-ai\claude-code-win32-x64\claude.exe\nnpm error errno -4082\nnpm error EBUSY: resource busy or locked, copyfile 'C:\Users\malei\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code\node_modules\@anthropic-ai\claude-code-win32-x64\claude.exe' -> 'C:\Users\malei\AppData\Roaming\npm\node_modules\@anthropic-ai\.claude-code-fxXIR0Uj\node_modules\@anthropic-ai\claude-code-win32-x64\claude.exe'\nnpm error A complete log of this run can be found in: C:\Users\malei\AppData\Local\npm-cache\_logs\2026-04-23T06_32_59_895Z-debug-0.log\n at z_8 (B:/~BUN/root/src/entrypoints/cli.js:2806:2197)\n at async <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:8337:10868)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T06:33:00.487Z"},{"error":"HbH: Failed to install new version of claude: npm error code EBUSY\nnpm error syscall copyfile\nnpm error path C:\Users\malei\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code\node_modules\@anthropic-ai\claude-code-win32-x64\claude.exe\nnpm error dest C:\Users\malei\AppData\Roaming\npm\node_modules\@anthropic-ai\.claude-code-fxXIR0Uj\node_modules\@anthropic-ai\claude-code-win32-x64\claude.exe\nnpm error errno -4082\nnpm error EBUSY: resource busy or locked, copyfile 'C:\Users\malei\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code\node_modules\@anthropic-ai\claude-code-win32-x64\claude.exe' -> 'C:\Users\malei\AppData\Roaming\npm\node_modules\@anthropic-ai\.claude-code-fxXIR0Uj\node_modules\@anthropic-ai\claude-code-win32-x64\claude.exe'\nnpm error A complete log of this run can be found in: C:\Users\malei\AppData\Local\npm-cache\_logs\2026-04-23T07_03_00_078Z-debug-0.log\n at z_8 (B:/~BUN/root/src/entrypoints/cli.js:2806:2197)\n at async <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:8337:10868)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T07:03:00.827Z"},{"error":"HbH: Failed to install new version of claude: npm error code EBUSY\nnpm error syscall copyfile\nnpm error path C:\Users\malei\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code\node_modules\@anthropic-ai\claude-code-win32-x64\claude.exe\nnpm error dest C:\Users\malei\AppData\Roaming\npm\node_modules\@anthropic-ai\.claude-code-fxXIR0Uj\node_modules\@anthropic-ai\claude-code-win32-x64\claude.exe\nnpm error errno -4082\nnpm error EBUSY: resource busy or locked, copyfile 'C:\Users\malei\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code\node_modules\@anthropic-ai\claude-code-win32-x64\claude.exe' -> 'C:\Users\malei\AppData\Roaming\npm\node_modules\@anthropic-ai\.claude-code-fxXIR0Uj\node_modules\@anthropic-ai\claude-code-win32-x64\claude.exe'\nnpm error A complete log of this run can be found in: C:\Users\malei\AppData\Local\npm-cache\_logs\2026-04-23T07_32_59_933Z-debug-0.log\n at z_8 (B:/~BUN/root/src/entrypoints/cli.js:2806:2197)\n at async <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:8337:10868)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T07:33:00.789Z"},{"error":"HbH: Failed to install new version of claude: npm error code EBUSY\nnpm error syscall copyfile\nnpm error path C:\Users\malei\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code\node_modules\@anthropic-ai\claude-code-win32-x64\claude.exe\nnpm error dest C:\Users\malei\AppData\Roaming\npm\node_modules\@anthropic-ai\.claude-code-fxXIR0Uj\node_modules\@anthropic-ai\claude-code-win32-x64\claude.exe\nnpm error errno -4082\nnpm error EBUSY: resource busy or locked, copyfile 'C:\Users\malei\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code\node_modules\@anthropic-ai\claude-code-win32-x64\claude.exe' -> 'C:\Users\malei\AppData\Roaming\npm\node_modules\@anthropic-ai\.claude-code-fxXIR0Uj\node_modules\@anthropic-ai\claude-code-win32-x64\claude.exe'\nnpm error A complete log of this run can be found in: C:\Users\malei\AppData\Local\npm-cache\_logs\2026-04-23T08_03_00_054Z-debug-0.log\n at z_8 (B:/~BUN/root/src/entrypoints/cli.js:2806:2197)\n at async <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:8337:10868)\n at processTicksAndReject…

Code Example

[{"error":"HbH: Failed to install new version of claude:  npm error code EBUSY\nnpm error syscall copyfile\nnpm error path C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\claude-code\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe\nnpm error dest C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\.claude-code-fxXIR0Uj\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe\nnpm error errno -4082\nnpm error EBUSY: resource busy or locked, copyfile 'C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\claude-code\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe' -> 'C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\.claude-code-fxXIR0Uj\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe'\nnpm error A complete log of this run can be found in: C:\\Users\\malei\\AppData\\Local\\npm-cache\\_logs\\2026-04-23T06_32_59_895Z-debug-0.log\n    at z_8 (B:/~BUN/root/src/entrypoints/cli.js:2806:2197)\n    at async <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:8337:10868)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T06:33:00.487Z"},{"error":"HbH: Failed to install new version of claude:  npm error code EBUSY\nnpm error syscall copyfile\nnpm error path C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\claude-code\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe\nnpm error dest C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\.claude-code-fxXIR0Uj\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe\nnpm error errno -4082\nnpm error EBUSY: resource busy or locked, copyfile 'C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\claude-code\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe' -> 'C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\.claude-code-fxXIR0Uj\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe'\nnpm error A complete log of this run can be found in: C:\\Users\\malei\\AppData\\Local\\npm-cache\\_logs\\2026-04-23T07_03_00_078Z-debug-0.log\n    at z_8 (B:/~BUN/root/src/entrypoints/cli.js:2806:2197)\n    at async <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:8337:10868)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T07:03:00.827Z"},{"error":"HbH: Failed to install new version of claude:  npm error code EBUSY\nnpm error syscall copyfile\nnpm error path C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\claude-code\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe\nnpm error dest C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\.claude-code-fxXIR0Uj\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe\nnpm error errno -4082\nnpm error EBUSY: resource busy or locked, copyfile 'C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\claude-code\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe' -> 'C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\.claude-code-fxXIR0Uj\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe'\nnpm error A complete log of this run can be found in: C:\\Users\\malei\\AppData\\Local\\npm-cache\\_logs\\2026-04-23T07_32_59_933Z-debug-0.log\n    at z_8 (B:/~BUN/root/src/entrypoints/cli.js:2806:2197)\n    at async <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:8337:10868)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T07:33:00.789Z"},{"error":"HbH: Failed to install new version of claude:  npm error code EBUSY\nnpm error syscall copyfile\nnpm error path C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\claude-code\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe\nnpm error dest C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\.claude-code-fxXIR0Uj\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe\nnpm error errno -4082\nnpm error EBUSY: resource busy or locked, copyfile 'C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\claude-code\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe' -> 'C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\.claude-code-fxXIR0Uj\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe'\nnpm error A complete log of this run can be found in: C:\\Users\\malei\\AppData\\Local\\npm-cache\\_logs\\2026-04-23T08_03_00_054Z-debug-0.log\n    at z_8 (B:/~BUN/root/src/entrypoints/cli.js:2806:2197)\n    at async <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:8337:10868)\n    at processTicksAndReject…
RAW_BUFFERClick to expand / collapse

Bug Description i upgraded on max plan, but opus 4.7 1m context shows as extra usage

Environment Info

  • Platform: win32
  • Terminal: vscode
  • Version: 2.1.116
  • Feedback ID: 49fc8396-7cec-4fb0-9e8c-4e2e0c04e334

Errors

[{"error":"HbH: Failed to install new version of claude:  npm error code EBUSY\nnpm error syscall copyfile\nnpm error path C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\claude-code\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe\nnpm error dest C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\.claude-code-fxXIR0Uj\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe\nnpm error errno -4082\nnpm error EBUSY: resource busy or locked, copyfile 'C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\claude-code\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe' -> 'C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\.claude-code-fxXIR0Uj\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe'\nnpm error A complete log of this run can be found in: C:\\Users\\malei\\AppData\\Local\\npm-cache\\_logs\\2026-04-23T06_32_59_895Z-debug-0.log\n    at z_8 (B:/~BUN/root/src/entrypoints/cli.js:2806:2197)\n    at async <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:8337:10868)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T06:33:00.487Z"},{"error":"HbH: Failed to install new version of claude:  npm error code EBUSY\nnpm error syscall copyfile\nnpm error path C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\claude-code\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe\nnpm error dest C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\.claude-code-fxXIR0Uj\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe\nnpm error errno -4082\nnpm error EBUSY: resource busy or locked, copyfile 'C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\claude-code\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe' -> 'C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\.claude-code-fxXIR0Uj\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe'\nnpm error A complete log of this run can be found in: C:\\Users\\malei\\AppData\\Local\\npm-cache\\_logs\\2026-04-23T07_03_00_078Z-debug-0.log\n    at z_8 (B:/~BUN/root/src/entrypoints/cli.js:2806:2197)\n    at async <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:8337:10868)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T07:03:00.827Z"},{"error":"HbH: Failed to install new version of claude:  npm error code EBUSY\nnpm error syscall copyfile\nnpm error path C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\claude-code\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe\nnpm error dest C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\.claude-code-fxXIR0Uj\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe\nnpm error errno -4082\nnpm error EBUSY: resource busy or locked, copyfile 'C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\claude-code\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe' -> 'C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\.claude-code-fxXIR0Uj\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe'\nnpm error A complete log of this run can be found in: C:\\Users\\malei\\AppData\\Local\\npm-cache\\_logs\\2026-04-23T07_32_59_933Z-debug-0.log\n    at z_8 (B:/~BUN/root/src/entrypoints/cli.js:2806:2197)\n    at async <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:8337:10868)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T07:33:00.789Z"},{"error":"HbH: Failed to install new version of claude:  npm error code EBUSY\nnpm error syscall copyfile\nnpm error path C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\claude-code\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe\nnpm error dest C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\.claude-code-fxXIR0Uj\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe\nnpm error errno -4082\nnpm error EBUSY: resource busy or locked, copyfile 'C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\claude-code\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe' -> 'C:\\Users\\malei\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\.claude-code-fxXIR0Uj\\node_modules\\@anthropic-ai\\claude-code-win32-x64\\claude.exe'\nnpm error A complete log of this run can be found in: C:\\Users\\malei\\AppData\\Local\\npm-cache\\_logs\\2026-04-23T08_03_00_054Z-debug-0.log\n    at z_8 (B:/~BUN/root/src/entrypoints/cli.js:2806:2197)\n    at async <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:8337:10868)\n    at processTicksAndReject…

Note: Content was truncated.

extent analysis

TL;DR

The issue is likely due to a resource busy or locked error when trying to install a new version of claude, and a potential workaround is to close any processes using the claude.exe file.

Guidance

  • Check if any processes are using the claude.exe file and close them to free up the resource.
  • Try reinstalling the @anthropic-ai/claud-code package using npm with the --force flag to overwrite any existing files.
  • Verify that the claude.exe file is not being used by any other processes or applications.
  • If the issue persists, try deleting the node_modules directory and reinstalling the dependencies.

Example

No code snippet is provided as the issue seems to be related to a resource lock rather than a code error.

Notes

The provided error logs indicate a resource busy or locked error, which suggests that the claude.exe file is being used by another process. The issue may be resolved by closing the process using the file or reinstalling the package with the --force flag.

Recommendation

Apply workaround: Close any processes using the claude.exe file and try reinstalling the @anthropic-ai/claud-code package. This should resolve the resource busy or locked error and allow the installation to complete.

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

claude-code - 💡(How to fix) Fix [Bug] Claude 3.5 Opus 200K context window incorrectly charged as extra usage on Max plan [1 participants]