microsoft / microsoft/winget-pkgs

Anthropic.ClaudeCode: false upgrade prompt — in-place self-update makes winget offer a downgrade

Open
#422,534 1 comment 0 reactions 0 assignees View on GitHub
Needs-Triage
Dominant language
No language data
Stars
11.1k
Forks
9.7k
Avg merge
1h 32m
Merged PRs (30d)
616

Description

### Package

Anthropic.ClaudeCode

### Problem

Claude Code ships with a built-in auto-updater that replaces `claude.exe` in place. After installation, the binary self-updates beyond the winget-packaged version, so `winget list` shows a stale registered version while `claude --version` reports a newer one. `winget upgrade` then offers to "upgrade" to a version that is actually **older** than what's installed.

### Reproduction (my machine)

```
$ claude --version
2.1.238 (Claude Code)

$ winget list --id Anthropic.ClaudeCode
Name Id Version Available
Claude Code Anthropic.ClaudeCode 2.1.195 2.1.231

$ winget show Anthropic.ClaudeCode # Installer SHA256 matches 2.1.231
```

Running `winget upgrade Anthropic.ClaudeCode` would **downgrade** the binary from 2.1.238 to 2.1.231. Additionally, both download attempts from `downloads.claude.ai` failed mid-download (0x80072efd, 0x80072f78), so the downgrade didn't complete — but the false "Update available!" prompt keeps appearing on every winget invocation.

### Environment

- Windows 11 Home China 10.0.26200 (x64)
- winget v1.29.290

### Suggested directions (maintainer's choice)

1. Have the package disable Claude Code's built-in auto-updater at install time (e.g. set `DISABLE_AUTOUPDATER=1` user env var or ship a settings file), so versions stay in sync; or
2. Document that winget-managed installs should not self-update, and/or add an upgrade message warning users the binary may be newer; or
3. If in-place self-update is expected behavior, winget may want a way to mark such packages as externally-updatable so they don't show false upgrade prompts.

Happy to provide any additional details. Thanks!

Contributor guide

Open the contributing guide

Research direction

Start with the Anthropic.ClaudeCode package manifest and the winget behavior around its registered and reported versions. Reproduce the mismatch using winget list, winget show, and claude --version, then determine whether the manifest can prevent self-updates or needs a warning or documentation change. Done means winget no longer presents a misleading downgrade, or the limitation and expected behavior are clearly documented.

Written by the indexing model from the issue text.

Assessment

Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.