claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Bug Report :: When Update keeps giving me please wait and try again later

Open yabasha opened this issue 5 months ago • 11 comments

Bug Description

Environment Info

  • Platform: darwin
  • Terminal: WarpTerminal
  • Version: 1.0.84
  • Feedback ID: 9e9d788d-78eb-46f1-b56e-7a4627c7a71e

Errors

[{"error":"Error: Failed to install Claude CLI package: npm error code ENOTEMPTY\nnpm error syscall rename\nnpm error path /Users/yabasha/.claude/local/node_modules/@anthropic-ai/claude-code\nnpm error dest /Users/yabasha/.claude/local/node_modules/@anthropic-ai/.claude-code-vbCcGUUB\nnpm error errno -66\nnpm error ENOTEMPTY: directory not empty, rename '/Users/yabasha/.claude/local/node_modules/@anthropic-ai/claude-code' -> '/Users/yabasha/.claude/local/node_modules/@anthropic-ai/.claude-code-vbCcGUUB'\nnpm error A complete log of this run can be found in: /Users/yabasha/.npm/_logs/2025-08-20T17_44_38_530Z-debug-0.log\n    at Qd (file:///Users/yabasha/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1604:575)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async file:///Users/yabasha/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:3374:10867","timestamp":"2025-08-20T17:44:39.051Z"},{"error":"Error: Failed to install Claude CLI package: npm error code ENOTEMPTY\nnpm error syscall rename\nnpm error path /Users/yabasha/.claude/local/node_modules/@anthropic-ai/claude-code\nnpm error dest /Users/yabasha/.claude/local/node_modules/@anthropic-ai/.claude-code-vbCcGUUB\nnpm error errno -66\nnpm error ENOTEMPTY: directory not empty, rename '/Users/yabasha/.claude/local/node_modules/@anthropic-ai/claude-code' -> '/Users/yabasha/.claude/local/node_modules/@anthropic-ai/.claude-code-vbCcGUUB'\nnpm error A complete log of this run can be found in: /Users/yabasha/.npm/_logs/2025-08-20T17_44_49_411Z-debug-0.log\n    at Qd (file:///Users/yabasha/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1604:575)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async file:///Users/yabasha/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:3374:10867","timestamp":"2025-08-20T17:44:49.533Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.0: all messages must have non-empty content except for the optional final assistant message\"},\"request_id\":\"req_011CSKNu4BxdpHDSbaPH48u5\"}\n    at D6.generate (file:///Users/yabasha/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:942:2414)\n    at aP.makeStatusError (file:///Users/yabasha/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:959:2101)\n    at aP.makeRequest (file:///Users/yabasha/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:959:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-08-20T17:45:17.240Z"}]

claude update

Current version: 1.0.84
Checking for updates...
New version available: 1.0.85 (current: 1.0.84)
Installing update...
Using local installation update method...
Error: Another instance is currently performing an update
Please wait and try again later

yabasha avatar Aug 20 '25 17:08 yabasha

@claude still can't update ClaudeCode:

Current version: 1.0.84
Checking for updates...
New version available: 1.0.88 (current: 1.0.84)
Installing update...
Using local installation update method...
Error: Another instance is currently performing an update
Please wait and try again later

yabasha avatar Aug 22 '25 06:08 yabasha

I had this problem and the solution for me was: in ~/.claude/local/node_modules/@anthropic-ai there were two folders, one claude-code and one with an appended randomly generated string. Removing that folder seems to have fixed the problem. Probably I was having issues once and did the renaming manually, or somewhere in some other update process something went wrong, but removing that, which is anyways old backup, fixed it and now it's back updating automagically 💯

Hope this helps!

scotch83 avatar Aug 25 '25 16:08 scotch83

I'm experiencing this same issue on Linux with a slightly different manifestation:

Error message:

Another process is currently updating Claude. Please try again in a moment.

Root cause: A stale lock directory at ~/.local/state/claude/locks/2.0.55.lock that wasn't cleaned up from a previous update attempt. The directory was empty and there was no actual update process running.

Platform:

  • Ubuntu noble 24.04 x86_64 (kernel 6.8.0-88-generic)
  • Claude Code version: 2.0.55

Workaround:

rm -rf ~/.local/state/claude/locks/2.0.55.lock

This suggests the lock cleanup issue affects multiple locations:

  1. ~/.claude/local/node_modules/@anthropic-ai (original issue)
  2. ~/.claude/.update.lock (mentioned in #559)
  3. ~/.local/state/claude/locks/<version>.lock (this case)

It appears Claude Code's update process has a systematic problem with cleaning up locks when updates fail or are interrupted.

jextern avatar Dec 01 '25 05:12 jextern

Ran into this today on MacOS 26.2 RC, Claude Code 2.0.64

Another process is currently updating Claude. Please try again in a moment.

Fix: ls -la ~/.local/state/claude/locks/2.0.64.lock 
rm -rf ~/.local/state/claude/locks/2.0.64.lock claude update

Claude update runs ok.

  • Start Claude Code session
  • /exit
  • claude update

Update fails again.

tonydehnke avatar Dec 11 '25 03:12 tonydehnke

not able to update on MacOS.

claude update
Current version: 2.0.64
Checking for updates...
Another process is currently updating Claude. Please try again in a moment.

sanjayshr avatar Dec 11 '25 03:12 sanjayshr

Same here. Stuck on 2.0.64.

captCovalent avatar Dec 11 '25 10:12 captCovalent

Same here, stuck on 2.0.62. Removed the lock files and it worked. Thanks

rm -rf ~/.local/state/claude/locks/2.0.61.lock 
rm -rf ~/.local/state/claude/locks/2.0.62.lock 
rm -rf ~/.local/state/claude/locks/2.0.65.lock 

danmana avatar Dec 11 '25 17:12 danmana

Looks like Version 2.0.67 has a fix for this possibly, I'm not totally sure it's the same issue though. As mine was already on the latest when displaying the issue.

• Fixed false "Another process is currently updating Claude" error when running claude update while another instance is already on the latest version

And this fix might help others: • Fixed claude install --force not bypassing stale lock files

tonydehnke avatar Dec 12 '25 02:12 tonydehnke

I'm using the native Windows Claude Code installation. For me, the locations to delete to fix the "Another instance is currently performing an update" problem are the following:

  • in %USERPROFILE%\.local\share\claude\versions, delete the most recent version file that is 0 bytes long, e.g. file 2.0.67
  • in %USERPROFILE%\.local\state\claude\locks\, delete the folder for the most recent version, e.g. folder 2.0.67.lock (the folder was empty in my case)

then run claude update

The update then succeeded.

Current version: 2.0.65
Checking for updates...
Successfully updated from 2.0.65 to version 2.0.67