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 PC. This page sets that up on Windows. 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, log in, find its path, paste the path into the game's settings.
Claude Code
Needs a Claude Pro or Max subscription. The game uses the subscription login, not an API key.
1. Install Claude Code
- Open PowerShell (Start menu, type "PowerShell").
- Run:
irm https://claude.ai/install.ps1 | iex- The installer ends with Location: and the full path of the program, normally
C:\Users\<your name>\.local\bin\claude.exe. This is the path the game needs later. - The installer does not make the
claudecommand known to PowerShell by itself: its setup notes say that the folder "is not in your PATH". Add the folder with this command:
$bin = Join-Path (Join-Path $env:USERPROFILE ".local") "bin"
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path","User") + ";" + $bin, "User")- Close PowerShell and open it again, so the new
claudecommand is found. Close the whole window, not only the tab. - Check that it works:
claude --version- If PowerShell answers that
claudeis not recognized (in German: "wurde nicht als Name eines Cmdlet ... erkannt"), step 4 or 5 is missing. See "claudeis not recognized" under Troubleshooting. - If the installer asks for Git, install Git for Windows and run step 2 again.
- Use this installer and not
npm install -g: it gives you a realclaude.exe. npm only gives aclaude.cmdwrapper, which may not work as the path in the game.
2. Log in to Claude Code
- Run:
claude- When asked how to log in, choose the Claude account with subscription option.
- 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.
- Type
/exitto leave Claude Code. - Check the login:
claude auth status3. Find the path of Claude Code
Run:
(Get-Command claude).SourceIt prints the full path, normally:
C:\Users\<your name>\.local\bin\claude.exeCopy that line. It is the same path the installer showed as Location:.
4. Add Claude Code to the settings
- Start the game and open Settings → Enemy CPU.
- In the Claude Code section, paste the path into Path of the
claudeprogram. No quotes around it. - Move Claude Code to the top of the order if it should play first.
- Press Test connection under the path. It asks the model for one real decision and shows the result or the error next to the button.
Codex
Needs a ChatGPT plan that includes Codex.
1. Install Codex
- Install Node.js (the LTS version) if you do not have it. Codex is installed through npm, which comes with Node.js.
- Open PowerShell and run:
npm install -g @openai/codex- Close PowerShell and open it again.
- Check that it works:
codex --version2. Log in to Codex
- Run:
codex login- Choose Sign in with ChatGPT. Your browser opens: sign in and approve, then go back to PowerShell.
- Check the login:
codex login status3. Find the path of Codex
Run:
where.exe codexIt prints more than one line. Copy the one that ends in .cmd, normally:
C:\Users\<your name>\AppData\Roaming\npm\codex.cmd- Type
where.exein full. Plainwheremeans something else in PowerShell and prints nothing. - The
.cmdat the end matters: the game cannot start the line without it.
4. Add Codex to the settings
- Start the game and open Settings → Enemy CPU.
- In the Codex section, paste the path into Path of the
codexprogram. No quotes around it. - Move Codex to the place in the order where it should play.
- Press Test connection under the path.
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.
Check that the program is installed
Run the line for your program. It answers True or False.
Test-Path "$env:USERPROFILE/.local/bin/claude.exe"Test-Path "$env:APPDATA/npm/codex.cmd"True: the program is there. Only PowerShell does not find it by name; go on with the next headings.False: the installation did not finish. Run the install command again and read its last lines. Claude Code ends with Location: and the path of the program; an error there is the thing to solve first.
claude is not recognized
The installer does not add its folder to PATH, so PowerShell does not know the name claude.
- Run the PATH command of "Install Claude Code", step 4.
- Close the whole PowerShell window and open it again. A new tab in the same window still has the old PATH.
- Run
claude --version. To make the name work in the window that is already open:
$env:Path += ";" + (Join-Path (Join-Path $env:USERPROFILE ".local") "bin")The game does not need any of this. It only needs the full path in its settings, and you can log in without PATH (next heading).
Start Claude Code without PATH
Start the program by its full path:
& "$env:USERPROFILE/.local/bin/claude.exe"Or go to its folder one step at a time, which is hard to mistype:
cd $env:USERPROFILE
cd .local
cd bin
.\claude.exeClaude Code starts. Log in, then type /exit.
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.localis missing.C:\Users\<your name>/local\bin\claude.exe: the dot of.localis missing. Some chat apps drop the\in front of a dot when a command is passed on. Copy commands from this page, not from a chat message.
A wrong folder was added to PATH
This happens when the PATH command was run with a lost \. Look at what is saved:
[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:
$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.
codex is not recognized
- Close the whole PowerShell window and open it again.
- Still missing: check that the program is installed (first heading).
Falsemeansnpm install -g @openai/codexdid not finish. True: the folderAppData\Roaming\npmin your user folder is not in your PATH. Add it in the Start menu under "Edit environment variables for your account", or start Codex by its full path:
& "$env:APPDATA/npm/codex.cmd" loginnpm is not recognized
Node.js is not installed, or PowerShell was open while it was installed. Install Node.js, then open a new PowerShell window.
PowerShell refuses to run codex: scripts are disabled
On a German Windows: ... kann nicht geladen werden, da die Ausführung von Skripts auf diesem System deaktiviert ist. Type codex.cmd instead of codex, for example codex.cmd login.
The game says the program was not found
Test connection answers "Not working: ... Claude Code not found at:" and a path. The path in Settings → Enemy CPU does not point at the program.
- Read the path in the message character by character.
C:\Users\<your name>.local\bin\claude.exehas lost the\in front of.local(see "The error shows a path that is slightly wrong"). - Paste the full path, not only the name:
C:\Users\<your name>\.local\bin\claude.exefor Claude Code,C:\Users\<your name>\AppData\Roaming\npm\codex.cmdfor Codex. - No quotes around it, and no space at the end.
- It ends in
.exe(Claude Code) or.cmd(Codex). - Check it in PowerShell:
Test-Pathwith the path in quotes must answerTrue.
The test in the game fails
- Login error: the program is not logged in, or with an account without a subscription. Run
claudeorcodex loginin PowerShell again.claude auth statusandcodex login statusshow who is logged in. - Codex does not start: the path must be the line that ends in
.cmd. - 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.