Claude Code runs on Windows three ways: natively with PowerShell, natively with Git for Windows providing a Bash tool, or inside WSL 2. Native is the right default for most Windows projects. Choose WSL 2 when your project's tooling is Linux-first or when you need Claude Code's sandbox, which is not available on native Windows. A lot of older advice says WSL is required. That is out of date.

The short answer

Your situation Use
A Windows-native project (.NET, PowerShell, desktop apps, most Node and Python work) Native
You want Bash commands to work as they do in tutorials Native with Git for Windows installed
The project builds with Linux tools, shell scripts or Docker-first workflows WSL 2
You need Claude Code's command sandbox WSL 2
The repository already lives inside the Linux file system WSL 2

What changed

Anthropic's setup documentation lists native Windows installers: a PowerShell command, a CMD installer, and winget, with no administrator rights needed (Claude Code setup).

irm https://claude.ai/install.ps1 | iex
# or
winget install Anthropic.ClaudeCode

The same page says Git for Windows is optional. With it installed, Claude Code gets a Bash tool. Without it, Claude Code uses a PowerShell tool instead. It also needs a paid Claude plan or a Console account; the free plan does not include it.

How the three options differ

Native (PowerShell) Native + Git for Windows WSL 2
Shell the agent uses PowerShell Bash (Git Bash) Bash (real Linux)
Sandboxing Not supported Not supported Supported
File speed on a Windows-drive repo Fast Fast Slow across /mnt/c
File speed on a Linux-side repo Not applicable Not applicable Fast
Windows tools (MSBuild, .NET, PowerShell modules) Direct Direct Awkward
Linux tools (apt packages, shell scripts) Missing Partial Direct
Paths C:\src\app /c/src/app in Bash /home/you/app

The sandbox row comes from Anthropic's documentation, which marks sandboxing as not supported on native Windows and WSL 1, and supported on WSL 2.

When native is the better choice

Your project is a Windows project. If the build runs through dotnet, MSBuild, PowerShell scripts or a Windows installer, an agent in WSL has to reach back across the boundary for every command. Native removes that whole class of failure.

Your repository is on a Windows drive. WSL reads Windows drives through a translation layer, and operations that touch thousands of small files, such as installing dependencies or running git status on a large repository, are much slower there. Native reads the same files directly.

You run several agents and other Windows apps together. Editors, browsers, database tools and other AI command-line tools all see the same paths. Nothing needs converting.

When WSL 2 is still right

Linux-first tooling. If the project's README assumes make, shell scripts or packages from apt, run the agent where those exist.

You want the sandbox. If you plan to let the agent run commands with fewer approval prompts, the sandbox is the guardrail that makes that reasonable, and today it means WSL 2.

Parity with a Linux server. If production is Linux and bugs tend to be environment bugs, develop in the environment that matches.

If you choose WSL, keep the repository inside the Linux file system (/home/you/...), not under /mnt/c. That one decision removes most WSL performance complaints.

The mistake to avoid: one repository, both sides

Do not open the same working folder from Windows git and from WSL git. Line endings, file modes and worktree paths all differ between the two, and you get files that show as modified when nothing changed, or worktrees that one side cannot read. Pick a side per repository. We cover the worktree part in Git worktrees for AI coding agents on Windows.

Native gotchas worth knowing

  • PATH after install. A terminal that was open before installation does not see the new command. Open a new one.
  • Execution policy. If PowerShell refuses to run scripts the agent writes, check Get-ExecutionPolicy -List rather than loosening it globally without thought.
  • Bash syntax in a PowerShell session. Without Git for Windows, the agent writes PowerShell. Tutorials that show && chains, export or grep will not paste in cleanly. Installing Git for Windows is the simplest fix.
  • Long paths. Turn on git config --global core.longpaths true before a deep node_modules tree bites.
  • No sandbox. On native Windows, your protection is the permission prompts and what you allow. Read what you approve, and be careful with broad "always allow" rules.

What about Codex and Antigravity?

The same choice applies across the main command-line agents, and all three now support native Windows.

Tool Native Windows Note
Claude Code Yes No sandbox on native Windows
OpenAI Codex CLI Yes Has Windows sandbox options of its own; WSL advised for Linux-native tooling (Codex on Windows)
Google Antigravity CLI (agy) Yes Replaced Gemini CLI for consumer plans in June 2026 (Google announcement)
opencode Yes Its own docs still recommend WSL (opencode on Windows)

Where CPLai fits

CPLai is a Windows 11 desktop app, and its Terminal runs Claude Code, Codex, Antigravity, opencode and plain PowerShell as real sessions in one window, as tabs, columns or a grid. Each tool uses the login already on your machine. If you have picked native Windows for your agents, that is the setup CPLai is built around. It does not replace WSL for Linux-first projects.

Sources