[Windows] Orca Orchestrator emits unquoted compound cmd.exe /c expression — syntax error

Open 💬 0 comments Opened Jul 25, 2026 by freshoe-development

Bug Report

Codex CLI version: 0.145.0
Platform: Windows 10 (mingw64/Git Bash)

Description

The Orca orchestrator emits a compound cmd.exe /d /c command with bare & and nested parentheses without quoting, causing:

The syntax of the command is incorrect.

Failing command (verbatim)

C:/Windows/System32/cmd.exe /d /c if defined ORCA_CLI_COMMAND (echo CLI=%ORCA_CLI_COMMAND%) else (echo CLI=) & if defined ORCA_DEV_REPO_ROOT (echo DEV=%ORCA_DEV_REPO_ROOT%) else (echo DEV=)

The & is parsed by cmd.exe as a top-level command separator before the if/else is evaluated, and the unquoted compound expression breaks the parser.

Expected behavior

The orchestrator should wrap the entire compound expression in double quotes:

cmd.exe /d /c "if defined ORCA_CLI_COMMAND (echo CLI=%ORCA_CLI_COMMAND%) else (echo CLI=) & if defined ORCA_DEV_REPO_ROOT (echo DEV=%ORCA_DEV_REPO_ROOT%) else (echo DEV=)"

Steps to reproduce

  1. Install Codex CLI 0.145.0 on Windows 10
  2. Trigger the Orca orchestrator (it fires automatically on startup)
  3. Observe the cmd.exe syntax error in the terminal

Workaround

Set the environment variables so the if branches resolve cleanly:

set ORCA_CLI_COMMAND=
set ORCA_DEV_REPO_ROOT=

View original on GitHub ↗