Auto-update banner persists after restart when already on latest version

Status Fixed / completed
Reported on v2.1.251
Maintainer reply None cached
Activity 1 comment · opened Aug 28, 2026 · closed Aug 28, 2026

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

  1. Update Claude Code to the latest version (2.1.251) — update succeeds normally
  2. Restart the session as prompted
  3. After ~10 seconds (the startup delay before the first auto-update check), the green banner reappears: ✔ Update installed · Restart to apply
  4. 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:

  1. Stale result file: .last-update-result.json from the original 2.1.250→2.1.251 update is being read on startup to pre-populate the Zustand autoUpdaterResult store, causing the banner to render before a fresh version comparison runs.
  2. Same-version reinstall: npm install -g @anthropic-ai/claude-code@2.1.251 succeeds (exit 0) even when 2.1.251 is already installed, so the updater reports status: "success" without the st(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.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗