Skip to content

fix: codex-acp binary path missing .exe extension on Windows #2445

@Basit-Balogun10

Description

@Basit-Balogun10

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

  1. On Windows, run node apps/code/scripts/download-binaries.mjs to download codex-acp.exe
  2. Start the dev build with pnpm dev
  3. Create a new task and select a Codex model (e.g., gpt-5.4)
  4. Observe the error in logs and fallback to Claude

Fix

PR #2444 applies the same platform check pattern used for the Claude binary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions