Skip to content

Windows: /run devtools endpoint bare-spawns CLI shim (ENOENT) #2256

Description

@atomantic

Discovered while fixing #2243 (CoS CLI providers failing to spawn on Windows).

Status

The two larger parts of #2243's follow-up are already fixed in the #2243 PR:

  • CoS agent spawns now resolve+wrap the shim via prepareCliSpawn.
  • CoS agent termination (runner + direct mode) now routes through killProcessTree, so a cmd.exe-wrapped agent's real child isn't orphaned on Windows.

This issue tracks only the remaining, genuinely-separate item:

cos-runner /run devtools endpoint bare spawn

server/cos-runner/index.js POST /run (the devtools runner) still spawns the bare command under shell:false with the prompt passed as an argv (not stdin). It has the same latent Windows ENOENT bug as the agent path, but needs a different fix: wrapping a large prompt arg in cmd.exe /c risks the ~8191-char command-line limit, so it likely needs a stdin refactor before adopting prepareCliSpawn.

Note: the primary "Run Prompt" UI uses server/services/runner.js (already fixed), so this endpoint is a lower-priority / possibly-legacy path — confirm whether anything still calls it before investing. If nothing does, consider removing it instead.

Metadata

Metadata

Assignees

Labels

planTracked by /do:replan

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions