[codex] Hide Windows exec console windows#59466
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the core process execution helpers to hide transient Windows console windows by consistently setting windowsHide: true on the primary execFile and spawn code paths, aligning behavior with other Windows spawn sites in the repo.
Changes:
- Add
windowsHide: trueto both Windows execution branches inrunExec(execFiledirect +cmd.exewrapper). - Add
windowsHide: trueto thespawnoptions inrunCommandWithTimeout. - Expand Windows-specific regression tests to assert
windowsHideacross wrapped, shimmed, and direct invocation paths.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/process/exec.ts | Ensures Windows child processes spawned via execFile/spawn are created with hidden console windows. |
| src/process/exec.windows.test.ts | Adds assertions/tests verifying windowsHide is applied for wrapper, npm shim, and direct runExec paths. |
Greptile SummaryThis PR adds Confidence Score: 5/5
Reviews (1): Last reviewed commit: "fix(exec): hide windows console windows" | Re-trigger Greptile |
b20af0b to
9108888
Compare
9108888 to
81cde4c
Compare
81cde4c to
da7810c
Compare
da7810c to
1daac0c
Compare
1daac0c to
1d72c00
Compare
|
Landed via temp rebase onto main.
Thanks @lawrence3699! |
Summary
This hides Windows console windows for the main
execcode paths used by OpenClaw tools and command runners.Root Cause
runExecandrunCommandWithTimeoutspawned Windows child processes withoutwindowsHide: true. That caused brief visible console windows even though similar process launch sites elsewhere in the codebase were already hidden.Changes
windowsHide: trueto both WindowsexecFilepaths inrunExecwindowsHide: trueto thespawnpath inrunCommandWithTimeout.cmdwrapping, npm shim resolution, andwindowsVerbatimArgumentsbehavior unchangedValidation
pnpm exec vitest run src/process/exec.windows.test.tsNotes
Fixes #58566