[BUG] Auto-update Fails for claude-code
Status Closed — not planned
Maintainer reply None cached
Activity 10 comments · opened Jun 4, 2025 · closed Jan 11, 2026
Bug Description
I can't update claude-code without npm uninstall -g and reinstall. Every time it says "Restart to update", nothing changes, it's always the previous version.
Environment Info
- Platform: macos
- Terminal: iTerm.app
- Version: 1.0.10
- Feedback ID: bf7d74eb-aca0-4a29-946e-edf80e54930f
Errors
[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at genericNodeError (node:internal/errors:983:15)\n at wrappedFn (node:internal/errors:537:14)\n at checkExecSyncError (node:child_process:882:11)\n at execSync (node:child_process:954:15)\n at YZ (file:///Users/nick/.volta/tools/image/packages/@anthropic-ai/claude-code/lib/node_modules/@anthropic-ai/claude-code/cli.js:638:3921)\n at file:///Users/nick/.volta/tools/image/packages/@anthropic-ai/claude-code/lib/node_modules/@anthropic-ai/claude-code/cli.js:566:6842\n at Q (file:///Users/nick/.volta/tools/image/packages/@anthropic-ai/claude-code/lib/node_modules/@anthropic-ai/claude-code/cli.js:526:17069)\n at Qi (file:///Users/nick/.volta/tools/image/packages/@anthropic-ai/claude-code/lib/node_modules/@anthropic-ai/claude-code/cli.js:566:6034)\n at XG (file:///Users/nick/.volta/tools/image/packages/@anthropic-ai/claude-code/lib/node_modules/@anthropic-ai/claude-code/cli.js:566:5480)\n at UO2 (file:///Users/nick/.volta/tools/image/packages/@anthropic-ai/claude-code/lib/node_modules/@anthropic-ai/claude-code/cli.js:2002:4706)","timestamp":"2025-06-04T01:30:26.017Z"}]
10 Comments
Autoupdate has never worked for me reliably - ever. It will work once every now and then. It seems it's because of
npmcaching these versions aslatestinternally. What helps every time is running the following every now and then:npm cache clean --forceI am using pnpm and the issue of autoupdate also happens with me. WSL on Windows 11.
this is something that I may be running
I created a directory for global packages and configured pnpm to use the new directory path
added pnpm global bin directory to PATH and refresh the terminal
this is the actual command that seems to perform the manual update:
I would rather see this automatic and working.
I had the same issue on macOS. Switching to the native installation completely resolved it:
Note: Make sure
~/.localis owned by your user, notroot. If you usedsudoduring setup, fix with:sudo chown -R $(whoami) ~/.local.Auto-updates now work reliably without the npm permission issues. The native installation eliminates the underlying Node.js dependency problems causing these failures.
hi @zetomatoz - thanks for the solution, i am hitting the same issue. one question - what is the different between the local and the npm global setup?
@chaihwee79, the auto-update on macOS fails due to permission issues when trying to update system-installed npm packages. Native avoids this entirely.
Happening today for me on ubuntu
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue is absolutely still occurring, I am constantly having to delete the old install to proceed with the new install, even with
--force. My MDM profile doesn't allow me to install using install.sh as it's not a Known Developer binary. Come on!This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.