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

[BUG] Restart to apply stuck, no way to update

Open brennancheung opened this issue 6 months ago • 15 comments

Environment

  • Platform (select one):
    • [X ] Anthropic API
    • [ ] AWS Bedrock
    • [ ] Google Vertex AI
    • [ ] Other:
  • Claude CLI version: 1.0.15
  • Operating System: Windows 10, WSL2 Ubuntu 20
  • Terminal: Microsoft Terminal

Bug Description

Claude Code says ✓ Update installed · Restart to apply but there is no way to update it.

Steps to Reproduce

  1. npm i -g @anthropic-ai/claude-code
  2. claude
  3. The restart to apply message is shown.

Expected Behavior

  1. Either restarting Claude Code or running npm i -g @anthropic-ai/claude-code should apply the update.

Actual Behavior

No matter what I do, I can't get 1.0.16. There is no way to get the "Restart to apply" message to go away.

Additional Context

I suspect the npm repository doesn't have the latest version published. It's unclear if Claude Code itself has an update mechanism outside of npm install. We could use some clarification on this.

brennancheung avatar Jun 06 '25 21:06 brennancheung

Not a fan how these get auto-classified as duplicate without context. But you shouldn't need to re-install. I had a couple problems trying to upgrade 1.0.16 today as well.

michael-hedgineer avatar Jun 06 '25 21:06 michael-hedgineer

Can someone link the duplicate? I did a search before creating the issue and didn't see anything. I'm curious what was said and if there is a solution.

brennancheung avatar Jun 06 '25 21:06 brennancheung

Same thing has happened to me in the past. I searched and could not find anything. Something auto-tags the issues as dupes, not sure how or to what.

michael-hedgineer avatar Jun 06 '25 21:06 michael-hedgineer

Some additional context and how I got it to work:

➜  ~ which claude
/home/brennan/.bun/bin/claude

lrwxrwxrwx 1 brennan brennan  59 Jun  5 15:13 claude -> /home/brennan/node_modules/@anthropic-ai/claude-code/cli.js

npm uninstall -g @anthropic-ai/claude-code
rm -rf ~/node_modules/@anthropic-ai

which claude
claude not found

npm i -g @anthropic-ai/claude-code@latest

Might have been a stale version of Claude Code, not sure why it was going through bun. But uninstalling the global module and then finding any trace of it that might have been left behind and wiping that and then doing an npm install after that seems to have resolved the issue.

I'm on 1.0.17 now.

brennancheung avatar Jun 06 '25 21:06 brennancheung

No need to re-install, just run 'claude update'

dgtise25 avatar Jun 06 '25 21:06 dgtise25

The text ✓ Update installed · Restart to apply should be updated to specify that then. Restarting did nothing but hard to say whether that was because of multiple versions from an early Claude and stale symlinks.

brennancheung avatar Jun 07 '25 00:06 brennancheung

Agreed, it took me a while to figure that out too, the text is misleading. I run 'claude update' (when I gauge that the latest release is stable) at every start up, but currently have downgraded to 1.0.9 until they sort out the latest string of bugs. 1.0.9 is very stable, no issues in terms of crashing

dgtise25 avatar Jun 07 '25 05:06 dgtise25

Ran into the same issue of not being able to upgrade on a completely different system and OS (this time MacOS). I tried claude update but it did not work.

Solution was the same, uninstall the npm page. which claude still pointed to a working old version, rm -rf node_modules/@anthropic-ai/claude-code (symlink showed where the npm package was), and then remove the symlink. Then install the npm package again.

I can only guess earlier versions of CC installed differently and the claude update is not aware of how to clean up the old version. Hard to say for sure but hopefully this helps anyone else trying to upgrade or for the devs to be able to clear out the old version.

brennancheung avatar Jun 08 '25 02:06 brennancheung

Claude Code Status v1.0.17

I faced the same issue. Getting message: "Auto-updating to v1.0.24" that turns into "Update installed · Restart to apply" which implies all I need to do is restart.

Running claude update worked.

apostolisCodpal avatar Jun 14 '25 04:06 apostolisCodpal

I am having the same issue (have for the last 5 days or so) trying to update to 1.0.24

bdkinas avatar Jun 16 '25 19:06 bdkinas

Sorry for the trouble here. We are working towards a new way of distributing Claude Code that should be more reliable than npm but it's tricky to get this right and I want to be careful.

In the meantime, most problems should be resolvable by doing npm install -g @anthropic-ai/claude-code

wolffiex avatar Jun 18 '25 00:06 wolffiex

Sorry for the trouble here. We are working towards a new way of distributing Claude Code that should be more reliable than npm but it's tricky to get this right and I want to be careful.

In the meantime, most problems should be resolvable by doing npm install -g @anthropic-ai/claude-code

Even after doing this, I still get the message when I restart Code.

But, like @apostolisCodpal claude update worked

timothynott avatar Jun 18 '25 15:06 timothynott

It is not working when I do claude update or npm install -g @anthropic-ai/claude-code. I get a message saying it is updated, but now Claude code wont let me run it because I'm on 1.0.17

bdkinas avatar Jun 24 '25 14:06 bdkinas

you may have an alias or unusual location that is making claude update not work best thing to do is to npm install -g @anthropic-ai/claude-code and make sure you are running the global version. you can use commands like which claude to figure out what might be going wrong.

wolffiex avatar Jun 24 '25 15:06 wolffiex

Have you tried deleting pre-existing Claude folders before the update? Just backup any important files within those if needed. I had to do similar actions...

dgtise25 avatar Jun 24 '25 16:06 dgtise25

Closing this out, please create a new issue if you have issues with the auto-updater

rboyce-ant avatar Aug 22 '25 19:08 rboyce-ant

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.

github-actions[bot] avatar Aug 31 '25 14:08 github-actions[bot]