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.
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:
prepareCliSpawn.killProcessTree, so acmd.exe-wrapped agent's real child isn't orphaned on Windows.This issue tracks only the remaining, genuinely-separate item:
cos-runner
/rundevtools endpoint bare spawnserver/cos-runner/index.jsPOST /run(the devtools runner) still spawns the bare command undershell:falsewith 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 incmd.exe /crisks the ~8191-char command-line limit, so it likely needs a stdin refactor before adoptingprepareCliSpawn.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.