Tag: Windows PowerShell

  • Installing Claude Code on Windows in 2026: The Native Installer Walkthrough That Actually Works

    Installing Claude Code on Windows in 2026: The Native Installer Walkthrough That Actually Works

    If you have spent any time in the Claude Code subreddit or the GitHub issues tracker in the last six months, you have seen the same Windows install problem cycle through every week. Someone runs the install command, the installer prints “successfully installed,” and then claude --version returns “is not recognized as the name of a cmdlet.” Then come the suggestions: switch to Git Bash, switch to WSL2, reinstall Node, blow away npm. Half of them are wrong for the current installer. This guide is the one I wish existed when I set up Claude Code on a fresh Windows 11 machine this month.

    What changed in 2026: the native installer is now the default

    Anthropic shipped a native installer in 2025 that removed the Node.js dependency entirely. As of May 2026 it is the recommended path on every platform, and npm install of @anthropic-ai/claude-code is still supported but is no longer the primary method Anthropic tests and updates. The native installer downloads a single binary, drops it in ~/.local/bin, registers it on your PATH, and auto-updates in the background.

    What this means in practice on Windows: you do not need Node, you do not need npm, and you do not need WSL2 unless you specifically want a Linux toolchain. PowerShell on Windows 10 or 11 (64-bit) is enough.

    The two commands that actually work

    Open Windows PowerShell — not the x86 version, not Git Bash, not Command Prompt. The x86 entry runs as a 32-bit process and will fail on a 64-bit machine. Git Bash does not support the TTY features Claude Code’s interactive CLI needs, so you will hit the “Raw mode is not supported” error before you finish authenticating.

    Then run:

    irm https://claude.ai/install.ps1 | iex

    That is the entire install. irm is Invoke-RestMethod, iex is Invoke-Expression, and the script handles the binary download, PATH update, and shell hooks. When it finishes, close the terminal and open a new PowerShell window. This is the step everyone skips. The PATH change applies to new shells only — your current session still has the old PATH and will not find the binary.

    In the new window:

    claude --version

    You should see a version string. Then run claude with no arguments from any project directory. The CLI opens your default browser, asks you to sign in to your Anthropic account, and authorizes the local install. Setup, end to end, is under five minutes on a clean machine.

    You need a paid account — the free tier does not include Claude Code

    This catches new users every week. The free Claude.ai plan gets you chat on web, iOS, Android, and desktop. It does not get you Claude Code. To use the terminal CLI you need one of:

    A Pro subscription at $20 per month (or $17 per month billed annually). A Max 5x subscription at $100 per month. A Max 20x subscription at $200 per month. A Team Premium seat at $100 per seat per month annual or $125 monthly, minimum five seats. Or API credits — new API accounts get a small free credit pool to test with, but you are billed per token from there.

    Pro and Max draw from the same token budget as your regular Claude chat usage. The Pro window is roughly 44,000 tokens per five-hour rolling window, which third-party tracking puts at 10 to 40 prompts depending on codebase complexity. Max 5x and 20x scale that linearly. If you are evaluating whether to upgrade, the Pro window will tell you within a week — you either hit the cap during real work or you do not.

    The five errors you will hit, and what fixes them

    “claude is not recognized as the name of a cmdlet.” Your PATH was not updated, or you did not open a new terminal. First, close PowerShell and reopen. If the error persists, the install location exists but your user PATH does not reference it. Run this in PowerShell:

    $currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
    [Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')

    Close the terminal again, open a new one, and claude --version should work.

    “Raw mode is not supported.” You are running Claude Code inside Git Bash. Git Bash does not provide the TTY interface the CLI needs. Switch to Windows PowerShell. Everything you would do in Git Bash you can do in PowerShell; you just need to use Windows path syntax inside the prompt.

    Microsoft Store popup interrupts installation. A popup saying “Get an app to open this ‘claude’ link” sometimes appears during the install on Windows 11. This is a known issue tracked in Anthropic’s GitHub. Dismiss the popup, then re-run the install command. If it persists, install Git for Windows first — the installer registers a couple of URL handlers that resolve the popup.

    Duplicate npm and native installs. If you previously installed via npm and later ran the native installer, you have two binaries on PATH. The native one wins on some shells and the npm one wins on others, which produces confusing version mismatches. Remove the npm install:

    npm uninstall -g @anthropic-ai/claude-code

    Then verify with where.exe claude in PowerShell. Only one path should come back.

    “Invalid code” during OAuth. The browser-based login generates a one-time code that you paste back into the terminal. The code expires fast and is sensitive to copy-paste truncation. Press Enter to retry, complete the browser flow, and paste the code immediately — do not let it sit in your clipboard while you check email.

    What to do in the first session

    Once claude --version returns and the OAuth flow completes, run claude from inside a real project directory — not a fresh empty folder. Claude Code reads context from the surrounding repo, and the first thing it does in a useful session is index files and look for a .clauderules or CLAUDE.md. If you start in an empty directory the first interaction feels useless because there is nothing to ground the model on.

    If you want to lock to a specific model rather than the default, the current strings as of May 2026 are claude-opus-4-7 for the flagship, claude-sonnet-4-6 for the workhorse, and claude-haiku-4-5-20251001 for the fast tier. Sonnet 4.6 is what you want for almost all coding work — it is 30 to 50 percent faster than Sonnet 4.5 and ships with a 1M context window. Reserve Opus 4.7 for the hardest agentic refactors; it eats tokens noticeably faster.

    The setup is not the hard part

    Most of the Windows pain in the Claude Code ecosystem comes from people following install guides written for the npm-era CLI, then layering troubleshooting from the WSL2-era guides on top of that, then asking why nothing works. The current path is one PowerShell command, a new terminal, and a browser login. If you hit one of the five errors above, the fix is short. If you hit something else, the troubleshooting docs at code.claude.com cover it — most novel issues turn out to be PATH or shell-choice problems in a slightly different costume.

    The next thing to figure out is not installation. It is whether your Pro window survives a real week of work, and whether your team needs Premium seats. That math is what determines the actual cost of Claude Code on Windows — not whether the binary runs.

  • Claude Code v2.1.126: Gateway Model Picker, PowerShell Default on Windows, and the Week’s Full Release Stack

    Claude Code v2.1.126: Gateway Model Picker, PowerShell Default on Windows, and the Week’s Full Release Stack

    Last refreshed: May 15, 2026

    Claude Code shipped v2.1.126 today, May 1, 2026. This is the 9th release in April’s sprint and continues what has been a 2–3 releases per week cadence throughout the month. Here is the complete picture of what shipped this week across v2.1.120 through v2.1.126, with operational context for each feature that actually matters.

    v2.1.126 — Today’s Release

    Gateway Model Picker

    The gateway model picker allows you to route different tasks within a single Claude Code session to different models. This is the first step toward Claude Code as a multi-model orchestration layer rather than a single-model coding assistant. Practical use: run Haiku 4.5 on file reading, search, and summarization tasks where speed matters; route Opus 4.7 at complex reasoning, architecture decisions, and code generation where quality is the priority. The cost reduction on high-volume workflows can be material — Haiku is roughly 30× cheaper per token than Opus.

    PowerShell as Primary Shell on Windows — Git Bash No Longer Required

    This is the most significant quality-of-life change in this release for enterprise Windows shops. Claude Code previously required Git Bash as its terminal environment on Windows, which meant every Windows developer needed a non-standard shell installation, created friction in corporate IT environments with software approval processes, and produced a different developer experience than Mac/Linux teammates.

    Starting with v2.1.126, PowerShell is the primary shell on Windows. Git Bash is no longer required. For enterprise teams where half the developer fleet runs Windows and software installation requires IT approval, this removes a significant deployment barrier. Claude Code is now a standard Windows application from an IT management perspective.

    OAuth Code Terminal Input for WSL2, SSH, and Containers

    Authentication in headless environments — WSL2 sessions, SSH remote development, Docker containers — previously required workarounds. v2.1.126 adds OAuth code terminal input: Claude Code displays the authorization code directly in the terminal, you paste it into your browser, and authentication completes without requiring a browser redirect to the headless environment. Eliminates the most common authentication friction point for remote and containerized development workflows.

    claude project purge

    New command that cleans up stale project data accumulated across sessions. For teams running Claude Code in CI/CD pipelines or long-running agent workflows, project data can accumulate and affect performance. claude project purge gives you explicit control over that cleanup rather than relying on automatic garbage collection.

    v2.1.120–122 — April 28 Stack

    alwaysLoad MCP Option

    MCP servers can now be configured to always load regardless of context window state. Previously, Claude Code would make decisions about which MCP servers to initialize based on available context. alwaysLoad: true in your MCP server config guarantees that server is always available — critical for production deployments where MCP tools need to be reliably present, not conditionally loaded.

    claude ultrareview Subcommand

    claude ultrareview triggers a deep, multi-pass code review that goes beyond standard review. It applies multiple review personas in sequence — security researcher, performance engineer, maintainability analyst — and synthesizes findings into a prioritized report. For code that needs to meet high standards before production merge, ultrareview is the command. It consumes more tokens than standard review, so use it on pull requests that matter, not every commit.

    claude plugin prune

    Removes unused plugins from your Claude Code installation. As the plugin ecosystem has grown and plugin auto-update behavior has been refined in recent releases, teams accumulate plugins that are no longer active in their workflow. claude plugin prune audits your installed plugins against recent usage and removes those that have not been invoked within a configurable time window.

    Type-to-Filter Skills Search

    The skills picker now supports live type-to-filter — start typing a skill name and the list filters in real time. For teams with large skill libraries or plugin collections, this eliminates the scroll-and-hunt workflow that slowed skill invocation. Small UX change, large daily time savings at scale.

    ANTHROPIC_BEDROCK_SERVICE_TIER Environment Variable

    New environment variable that allows Claude Code running on Amazon Bedrock to specify service tier at the environment level rather than per-request. For teams using Claude Code through Bedrock as their primary deployment path — common in regulated industries that require AWS-native infrastructure — this simplifies configuration management across multiple environments and removes per-request overhead.

    OpenTelemetry Improvements

    Extended OpenTelemetry trace data now includes more granular span information for Claude Code operations. For enterprise teams with existing observability infrastructure (Datadog, Grafana, Honeycomb), Claude Code activity is now more fully integrated into your trace timeline — you can see exactly where Claude Code operations land within the context of your broader application traces.

    v2.1.123 — April 29

    Fixed OAuth 401 retry loop triggered when CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS was set. If you were seeing repeated authentication failures in environments with that flag set, update to v2.1.123 or later immediately.

    Update Now

    Update via npm install -g @anthropic-ai/claude-code@latest or through your package manager. v2.1.126 is the current stable release. For teams running Claude Code in CI/CD, update your Docker base images or pipeline steps to pin to 2.1.126.