agent-orchestrator icon indicating copy to clipboard operation
agent-orchestrator copied to clipboard

feat(daemon): generic Windows .cmd/.bat launch for worker and reviewer harnesses (umbrella)

Open OrcInc opened this issue 2 months ago • 1 comments

Problem

We have no generic way to launch a Windows .cmd/.bat shim for agent harnesses. Every npm-installed harness ships as a .cmd shim, not a .exe, so installs that only have the shim fail detection or launch. Each harness PR re-litigates this from scratch; PR #5267 is the latest example: it deliberately excludes .cmd shim launching because the launch mechanics don't exist yet.

What's missing:

  1. Supervised launch (pty-host → agent-process supervise) can't spawn a .cmd child; it needs the cmd.exe /d /s /c wrapping, quoting rules, process ownership, and ConPTY lifecycle done once, generically.
  2. Binary resolution and identity validation treat non-.exe candidates as unlaunchable, so shim-only installs report "not installed" or stay undetected even when identity checking would confirm them.

Related work

  • #3409: Codex resolver prefers codex.cmd over codex.exe, and supervise can't launch .cmd. Covers the Codex slice plus launch mechanics.
  • #3504: reviewer terminals invisible on Windows because ConPTY can't spawn .cmd reviewer binaries.
  • #5269: closed as completed on Sep 12 by nikhilachale, but no commit or merged PR references it; #5267 is still open. The goose .cmd detection gap may not actually be fixed. Needs re-verification.

Scope

  • Build one shared .cmd/.bat launch path (wrapping, quoting, ownership, ConPTY lifecycle) in the supervised chain.
  • Make binary resolution + identity validation accept shim candidates once the launch path can exec them.
  • Fold in the Codex-specific work from #3409.
  • Re-open or re-verify #5269; re-add .cmd candidates per harness (goose, codex, reviewer binaries) with identity validation enabled.

Non-goals

  • Per-harness shell scripting beyond what the shared wrapper provides.
  • POSIX changes; macOS/Linux launch already works.

OrcInc avatar Sep 13 '26 04:09 OrcInc

i tested agent and reviewer launches on my windows setup and did not hit a .cmd launch failure. i have not tested a setup where the agent is available only as a .cmd or .bat file, so i cannot confirm that case yet.

codebanditssss avatar Oct 29 '26 16:10 codebanditssss