Problem
Yea, I understand that Code only officially supports macOS at the moment. My local environ runs on windows and need to use the codex adapter to develop locally. Thought the one line fix proposed won't be an issue (thanks!)
On Windows, getCodexBinaryPath() looks for the binary at .vite/build/codex-acp/codex-acp — without the .exe extension. The file on disk is codex-acp.exe, so the lookup always fails and the Codex adapter cannot start.
Error shown:
codex-acp binary not found at ...\apps\code\.vite\build\codex-acp\codex-acp.
Run "node apps/code/scripts/download-binaries.mjs" to download it.
This causes the session to fall back to Claude silently, even when the user has explicitly selected a Codex/OpenAI model and the binary is present.
Root cause
getCodexBinaryPath() in apps/code/src/main/services/agent/service.ts hardcodes the binary name without a platform check, while getClaudeBinaryPath() (line 341) already handles Windows correctly:
// Claude binary - correct
const binary = process.platform === "win32" ? "claude.exe" : "claude";
// Codex binary - missing platform check
return this.bundledResources.resolve(".vite/build/codex-acp/codex-acp");
Steps to reproduce
- On Windows, run
node apps/code/scripts/download-binaries.mjs to download codex-acp.exe
- Start the dev build with
pnpm dev
- Create a new task and select a Codex model (e.g.,
gpt-5.4)
- Observe the error in logs and fallback to Claude
Fix
PR #2444 applies the same platform check pattern used for the Claude binary.
Problem
On Windows,
getCodexBinaryPath()looks for the binary at.vite/build/codex-acp/codex-acp— without the.exeextension. The file on disk iscodex-acp.exe, so the lookup always fails and the Codex adapter cannot start.Error shown:
This causes the session to fall back to Claude silently, even when the user has explicitly selected a Codex/OpenAI model and the binary is present.
Root cause
getCodexBinaryPath()inapps/code/src/main/services/agent/service.tshardcodes the binary name without a platform check, whilegetClaudeBinaryPath()(line 341) already handles Windows correctly:Steps to reproduce
node apps/code/scripts/download-binaries.mjsto downloadcodex-acp.exepnpm devgpt-5.4)Fix
PR #2444 applies the same platform check pattern used for the Claude binary.