Last verified

How to update Claude Code?

3 Steps · any install route
  1. Check what you're on with claude --version, then compare it against the current release — winget show Anthropic.ClaudeCode or the package page for your route.
  2. Update with claude update on a native install. Managed installs use their own manager: brew upgrade claude-code or winget upgrade Anthropic.ClaudeCode.
  3. Confirm by running claude --version again in a new terminal. The old session keeps running the old binary until you restart it.
Native install auto+ claude update
Homebrew / WinGet manualonly
Cost $0any route
Restart needed yesnew shell
§ 01 / PROOF

We actually ran it.

Methodology →
TEST RUN · AUG 01, 2026 · COMMAND SURFACE

The commands exist and are documented — and our own box was two months behind.

Straight from claude --help on CLI 2.1.170: update|upgrade — "Check for updates and install if" available; doctor — "Check the health of your Claude Code auto-updater"; install [target] — install a native build. So the CLI can update itself, and it ships a diagnostic specifically for when that doesn't happen.

What we did not do is run the upgrade. The binary in question is the one running this session, and swapping it mid-flight is a bad way to learn something. Treat step 2 as documented — the command surface is verified, the execution is not ours to claim. claude doctor we did start; it opens an interactive screen rather than printing a report, so it isn't useful piped into a script.

The reason this page exists is the third measurement. Our native install reported 2.1.170, with a binary dated 9 June, on a day when both WinGet and npm were publishing 2.1.220. Native installs are documented to update in the background; this one hadn't, for two months, silently. We're not diagnosing why from one machine — the practical lesson is that auto-update is not a guarantee you can skip checking.

Our version: 2.1.170Binary dated: 2026-06-09Published then: 2.1.220Commands verified: update · doctor · installUpgrade executed: no — see text
$ claude --version
2.1.170 (Claude Code)
$ claude --help | grep -iE 'update|doctor'
doctor Check the health of your Claude Code auto-updater
update|upgrade Check for updates and install if ...
$ winget show Anthropic.ClaudeCode
Version: 2.1.220
→ installed build was 50 patch releases behind
$
§ 02 / WHY

Each route, and its catch.

2.1
Native: automatic, but verify anyway

Native installs update in the background — that's the documented behaviour and the main reason Anthropic recommends this route. claude update forces the check immediately rather than waiting, and claude doctor exists to diagnose an updater that isn't doing its job.

Our experience above is the caveat: a background updater that quietly stops leaves you on an old build with no error to notice. Checking claude --version occasionally costs nothing.

2.2
Homebrew and WinGet: yours to drive

Neither auto-updates. On macOS: brew upgrade claude-code, or brew upgrade claude-code@latest if you installed the latest-channel cask. On Windows: winget upgrade Anthropic.ClaudeCode.

Worth knowing which cask you took — the stable claude-code channel deliberately trails about a week and skips releases with known regressions, so "behind" is sometimes the intended state rather than a failure.

2.3
After updating, restart the session

A running Claude Code session keeps the binary it started with. Update, then open a fresh terminal and check claude --version there — otherwise you're reading the old process's answer and concluding nothing changed.

Same logic applies to the IDE extensions and desktop app: they're separate surfaces over the same engine, and each needs its own restart to pick up a new build. How the surfaces relate is worth a minute if this is new to you.

Frequently asked.

Quick follow-ups people search after this question.

Q · 01 What is the command to update Claude Code? +
claude update (also accepted as claude upgrade) on a native install. Managed installs go through their manager instead: brew upgrade claude-code or winget upgrade Anthropic.ClaudeCode.
Q · 02 Doesn't it update itself? +
Native installs are documented to update in the background, and usually do. Ours didn't — it sat on a build from 9 June while the published version had moved 50 patch releases ahead. Check claude --version rather than assume.
Q · 03 How do I check which version I'm on? +
claude --version prints the number followed by (Claude Code). Run it in a new terminal after updating — an already-running session keeps the binary it started with.
Q · 04 What does claude doctor do? +
Per its own help text, it checks the health of the auto-updater — the tool to reach for when background updates stop happening. It opens an interactive screen, so it's for a human at a terminal rather than for scripts.
Q · 05 Can I stay on an older version deliberately? +
Yes, by choosing a managed install. Homebrew's stable claude-code cask trails the latest channel by roughly a week and skips releases with known regressions; nothing updates until you run brew upgrade.