Skip to content

Enemy CPU Setup (Windows) ​

The enemy can be played by a model on your own Claude or ChatGPT subscription. The game does not log in for you: it starts the claude (Claude Code) or codex (Codex) program that is installed and logged in on your computer. You need only one of the two; with both, the second takes over when the first fails or is used up. For each program the steps are the same: install it with its own installer, log in once, restart the game. The game finds the program by itself in the folder its installer uses, so you don't need to copy any path.

Claude Code on Windows ​

Needs a Claude Pro or Max subscription. The game uses the subscription login, not an API key.

1. Install Claude Code ​

  1. Open PowerShell (Start menu, type "PowerShell").
  2. Run:
powershell
irm https://claude.ai/install.ps1 | iex
  1. The installer ends with Location: and the program's path, normally C:\Users\<your name>\.local\bin\claude.exe. The game looks there by itself.
  • Use this installer and not npm install -g: it gives you a real claude.exe. The npm version is only a claude.cmd wrapper, which the game can't start.
  • If the installer asks for Git, install Git for Windows and run step 2 again.

2. Log in to Claude Code ​

The installer doesn't make the name claude known to PowerShell, so start it by its full path (copy the line, don't type it):

powershell
& "$env:USERPROFILE/.local/bin/claude.exe"
  1. When asked how to log in, choose the Claude account with subscription option.
  2. Your browser opens. Sign in and approve, then go back to PowerShell. If the browser does not open, copy the link PowerShell shows into your browser and paste the code back.
  3. Type /exit to leave Claude Code.

3. Use it in the game ​

  1. Restart the game and open Settings → Enemy CPU. Leave Path of the claude program empty.
  2. Move Claude Code to the top of the order if it should play first.
  3. Press Test connection. It asks the model for one real decision and shows the result or the error next to the button.

Codex on Windows ​

Needs a ChatGPT plan that includes Codex (Plus, Pro, Business, Enterprise).

1. Install Codex ​

  1. Open PowerShell.
  2. Run:
powershell
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
  1. It installs codex.exe to C:\Users\<your name>\AppData\Local\Programs\OpenAI\Codex\bin and adds that folder to your PATH. No Node.js needed.

2. Log in to Codex ​

  1. Close PowerShell and open a new window (the new PATH only reaches new windows), then run:
powershell
codex login
  1. Choose Sign in with ChatGPT. Your browser opens: sign in and approve, then go back to PowerShell.
  2. Check the login:
powershell
codex login status

3. Use it in the game ​

  1. Restart the game and open Settings → Enemy CPU. Leave Path of the codex program as codex.
  2. Move Codex to the place in the order where it should play.
  3. Press Test connection. Already installed Codex with npm install -g @openai/codex? The game can start that too (through Node.js). The installer above is still the better choice: it updates itself and needs no Node.js.

On a Mac ​

  1. Open Terminal and install one or both:
bash
curl -fsSL https://claude.ai/install.sh | bash
bash
curl -fsSL https://chatgpt.com/codex/install.sh | sh
  1. Log in: run ~/.local/bin/claude (choose the subscription login, then /exit) or ~/.local/bin/codex login (choose Sign in with ChatGPT).
  2. Restart the game, open Settings → Enemy CPU and press Test connection. The path fields can stay as they are: the game also finds Homebrew installs (/opt/homebrew/bin) and anything your Terminal finds.

After the setup ​

  • A changed setting applies from the next duel.
  • The order in Settings → Enemy CPU decides who plays: the first program that works. The next one takes over in the middle of a duel when it fails or reaches its limit, and the built-in bot is always last, so a duel never stops because of a login.
  • Each enemy tier has its own model and effort (see Enemies & AI). The same tab changes them.
  • Duels use your subscription's usage. The tab can cap it per program (decisions, tokens, cost).

Troubleshooting on Windows ​

Find the heading that matches what you see. On a German Windows, "is not recognized" reads: Die Benennung "claude" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines ausführbaren Programms erkannt. Use the copy button of a command instead of typing it: most problems below come from one lost character.

The game says the program was not found ​

The status in Settings → Enemy CPU (or Test connection) says what is missing and how to install it. The game looks in the folders the installers use, so this almost always means the installation did not finish, or a different installer was used.

  1. Check that the program is there. Run the line for your program; it answers True or False:
powershell
Test-Path "$env:USERPROFILE/.local/bin/claude.exe"
powershell
Test-Path "$env:LOCALAPPDATA/Programs/OpenAI/Codex/bin/codex.exe"
  1. False: run the install command again and read its last lines. Claude Code ends with Location: and the program's path; an error there is the thing to solve first.
  2. True, and the game still doesn't find it: clear the path field in Settings → Enemy CPU (or set it back to codex) and restart the game.
  3. The message says "is the npm version, which the game can't start": that is claude.cmd from npm install -g. Install Claude Code with the installer above.

claude is not recognized in PowerShell ​

The game doesn't need the name claude: it finds the program itself. Only for logging in, start it by its full path (see "Log in to Claude Code"), or step by step, which is hard to mistype:

powershell
cd $env:USERPROFILE
cd .local
cd bin
.\claude.exe

If you want the name claude in PowerShell too, add the folder to your PATH, then close the whole PowerShell window (not only the tab) and open it again:

powershell
$bin = Join-Path (Join-Path $env:USERPROFILE ".local") "bin"
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path","User") + ";" + $bin, "User")

codex is not recognized in PowerShell ​

Close the whole PowerShell window and open a new one: the installer added the folder to PATH, which only new windows see. Still missing: start it by its full path:

powershell
& "$env:LOCALAPPDATA/Programs/OpenAI/Codex/bin/codex.exe" login

The error shows a path that is slightly wrong ​

The folder is called .local: the dot is part of its name, and there is a \ in front of it. Compare the path in the error message with the right one:

  • Right: C:\Users\<your name>\.local\bin\claude.exe
  • C:\Users\<your name>.local\bin\claude.exe: the \ in front of .local is missing.
  • C:\Users\<your name>/local\bin\claude.exe: the dot of .local is missing. Chat apps (Discord, WhatsApp) drop the \ in front of a dot when a path is sent as plain text. Copy commands from this page or from a code block, not from a chat message. With the path field left empty, the game doesn't use a typed path at all.

A wrong folder was added to PATH ​

This happens when the PATH command was run with a lost \. Look at what is saved:

powershell
[Environment]::GetEnvironmentVariable("Path","User") -split ";"

A line like C:\Users\<your name>.local\bin is the wrong one. This removes it and adds the right folder:

powershell
$bin = Join-Path (Join-Path $env:USERPROFILE ".local") "bin"
$bad = $env:USERPROFILE + ".local"
$keep = [Environment]::GetEnvironmentVariable("Path","User") -split ";" | Where-Object { $_ -and $_ -notlike "$bad*" }
[Environment]::SetEnvironmentVariable("Path", (@($keep) + $bin) -join ";", "User")

Then close the whole PowerShell window and open it again.

The installer fails or the file is "being used by another process" ​

Antivirus software sometimes holds the download. Close other installer windows, delete the folder %USERPROFILE%\.claude\downloads, and run the install command again.

The test in the game fails ​

  • Login error: the program is not logged in, or with an account without a subscription. Log in again (step 2 of its section). claude auth status and codex login status show who is logged in.
  • It worked before and now it does not: the subscription's usage may be used up, or a limit set in the same tab is reached. The tab shows why a program is skipped.
  • The built-in bot plays whenever no program works, so you can keep playing while you fix this.