Skip to content

fix(acp): launch Windows command shims safely - #83

Merged
64ix merged 1 commit into
fork-mainfrom
codex/fix-windows-agent-launch
Aug 6, 2026
Merged

fix(acp): launch Windows command shims safely#83
64ix merged 1 commit into
fork-mainfrom
codex/fix-windows-agent-launch

Conversation

@64ix

@64ix 64ix commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Description

Route Windows .cmd and .bat ACP processes through cmd.exe with explicit argv escaping. This fixes npm-installed agents such as OpenCode failing with spawn EINVAL while preserving direct spawning for native executables and non-Windows hosts.

The same normalization is applied to ACP agent and terminal processes. shell=true is deliberately avoided.

Testing

  • Runtime package build: passed
  • Runtime typecheck: passed
  • Targeted Windows regression tests: 3 passed
  • Targeted oxlint: passed
  • Targeted oxfmt check: passed
  • Full runtime suite: 102 passed; 5 existing Windows-incompatible tests fail because they invoke POSIX sh/printf or assert /opt paths

Risk

ACP process spawning is security-sensitive. The wrapper is restricted to .cmd/.bat on Windows and explicitly escapes cmd.exe metacharacters.

Screenshot/Recording

Not applicable (process-launch fix).

Checklist
  • I kept this PR small and focused
  • I ran a self-review before opening this PR
  • I ran the relevant local checks or explained why not
  • I added regression tests
  • I only added comments where the logic is not obvious
  • I used a Conventional Commit title

@64ix
64ix merged commit 901e251 into fork-main Aug 6, 2026
1 check passed
@64ix
64ix deleted the codex/fix-windows-agent-launch branch August 6, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant