claude update downloading 226 MB every timeEvery time you run claude update, it downloads the full release tarball (~226 MB) — even when your installation is already the latest version. On typical WSL2 connections this is ~30 s of wall time and ~226 MB of silently-metered bandwidth per check.
strace that the command receives ~226 MB across 6,915 socket reads, then prints "Claude Code is up to date." Labels: area:packaging, bug, has repro, platform:wsl. Status: open, no upstream fix yet.
Before calling claude update, it asks the npm registry (~2 KB response) for the latest version and compares against claude --version. If they match it prints "up to date" and exits without downloading anything. If a newer version actually exists, it calls the real claude update as usual.
| path | wall time | bytes down |
|---|---|---|
claude update | ~30 s | ~226 MB |
| wrapper, up-to-date | ~0.3 s | ~2 KB (first run), 0 B (cache hit) |
| wrapper, update exists | ~30 s | ~226 MB (only when the release actually changed) |
claude update. You never end up without an update path.
npx @gaebalai/cc-guard --install-example claude-update-smart
curl -fsSL https://raw.githubusercontent.com/gaebalai/cc-guard/main/examples/claude-update-smart.sh \
-o ~/bin/claude-update-smart
chmod +x ~/bin/claude-update-smart
Add to your ~/.bashrc or ~/.zshrc:
alias claude-update='bash ~/bin/claude-update-smart'
WSL2 Ubuntu 22.04, claude 2.1.118 + 2.1.119, against the npm registry and api.github.com/repos/anthropics/claude-code/releases/latest. 15 automated assertions covering up-to-date skip, update-available path, stale-cache handling, missing-binary fallthrough, no-network fallthrough.
| variable | default | purpose |
|---|---|---|
CLAUDE_UPDATE_SMART_CACHE | ~/.cache/claude-update-smart.json | Where to cache the registry response |
CLAUDE_UPDATE_SMART_TTL | 3600 | Cache lifetime in seconds |
CLAUDE_UPDATE_SMART_NO_EXEC | (unset) | Print the decision only, do not call the real updater (for scripting and testing) |
Issue #51243 has been open for four days with no upstream response. A separate landing page makes the workaround discoverable from search engines before a package-level fix lands. If Anthropic ships a proper HEAD-request or metadata-endpoint fix, this page and the wrapper become unnecessary — and that will be a good day.