Auto-update banner persists after restart when already on latest version
Description
The green "✔ Update installed · Restart to apply" banner keeps reappearing after restarting Claude Code, even though the running version matches the latest published version. Restarting dismisses it briefly, but it returns within minutes of the new session starting.
Environment
- Claude Code version: 2.1.251
- npm latest: 2.1.251 (identical)
- Installation type: npm-global (
npm install -g @anthropic-ai/claude-code) - Platform: macOS (Darwin 25.6.0, Apple Silicon / Homebrew node)
Reproduction
- Update Claude Code to the latest version (2.1.251) — update succeeds normally
- Restart the session as prompted
- After ~10 seconds (the startup delay before the first auto-update check), the green banner reappears:
✔ Update installed · Restart to apply - Restarting again does not clear it — the banner returns every session
Observed state
~/.claude/.last-update-result.json contains a stale successful result from the prior update:
{"timestamp":"2026-08-28T21:44:02.421Z","path":"npm-global","outcome":"success","status":"success","version_from":"2.1.250","version_to":"2.1.251","error_code":null}
npm view @anthropic-ai/claude-code version --prefer-online returns 2.1.251, matching the running version exactly.
Suspected cause
The npm-global auto-updater (dr component) shows the banner when autoUpdaterResult.status === "success" and the result version differs from the compiled-in VERSION. One of these may be happening:
- Stale result file:
.last-update-result.jsonfrom the original 2.1.250→2.1.251 update is being read on startup to pre-populate the ZustandautoUpdaterResultstore, causing the banner to render before a fresh version comparison runs. - Same-version reinstall:
npm install -g @anthropic-ai/claude-code@2.1.251succeeds (exit 0) even when 2.1.251 is already installed, so the updater reportsstatus: "success"without thest(R?.version)guard (de) filtering it out — possibly due to a version string normalization edge case.
Expected behavior
The banner should not appear when the running version already matches the latest available version. Either the version comparison should gate the banner, or the stale result file should be cleared/invalidated on startup when the running version matches version_to.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗