Feature request: auto-check/update via winget before launch on Windows

Status Fixed / completed
Maintainer reply None cached
Activity 1 comment · opened Aug 8, 2026 · closed Aug 17, 2026

Problem

On Windows, Claude Code is commonly installed via winget install Anthropic.ClaudeCode. Unlike the npm-based install path (which I believe has some auto-update behavior baked in), a winget install has no equivalent - running claude never checks whether a newer version is available via winget, so users can silently run an outdated version indefinitely unless they remember to manually run winget upgrade Anthropic.ClaudeCode.

Proposed solution

Before launching, optionally check winget upgrade --id Anthropic.ClaudeCode (only on Windows, only when installed via the winget source) and apply the update if one is available, similar to how the npm-distributed version is understood to handle updates.

Current workaround

In the meantime, I'm using a PowerShell profile function that wraps the real claude.exe:

function claude {
    winget upgrade --id Anthropic.ClaudeCode --silent --accept-package-agreements --accept-source-agreements
    $exe = (Get-Command claude.exe -CommandType Application -ErrorAction SilentlyContinue | Select-Object -First 1).Source
    if (-not $exe) {
        Write-Error "claude.exe not found - is Claude Code still installed via winget?"
        return
    }
    & $exe @args
}

This resolves the exe path dynamically each call (rather than hardcoding it) so it survives winget changing the install folder across versions. Works well as a personal stopgap, but built-in support would be nicer than requiring every winget user to set this up themselves.

View original on GitHub ↗

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