Summary
On Windows, the runCommandWithTimeout and runExec functions in exec-CLVZ7JOg.js (source: src/process/exec.ts) spawn child processes via child_process.spawn() and child_process.execFile() without setting windowsHide: true. This causes a brief black console window flash every time an agent executes a tool command.
Other spawn sites in the codebase correctly set windowsHide: true:
- ACP client spawn (
acp-cli → resolveWindowsSpawnProgram propagates windowsHide)
- Process supervisor (
auth-profiles line ~40339 → windowsHide: true)
- Scheduled task restart (
windows-task-restart → windowsHide: true)
But the two most frequently called exec paths do not:
1. runCommandWithTimeout (spawn)
// src/process/exec.ts — runCommandWithTimeout
const child = spawn(..., {
stdio,
cwd,
env: resolvedEnv,
windowsVerbatimArguments: ...,
// ❌ missing: windowsHide: true
});
2. runExec (execFile)
// src/process/exec.ts — runExec
await execFileAsync(process.env.ComSpec ?? "cmd.exe", [...], {
...options,
windowsVerbatimArguments: true,
// ❌ missing: windowsHide: true
});
// and the non-batch path:
await execFileAsync(execCommand, execArgs, options);
// ❌ also missing windowsHide: true
Expected behavior
All child process spawns on Windows should use windowsHide: true to prevent console window flashes, consistent with the rest of the codebase.
Environment
- Windows 11 Pro
- OpenClaw 2026.3.28
- Node 24.13.0
- Gateway running via
gateway-silent.vbs (window style 0)
Workaround
Manually patching the dist file to add windowsHide: true to both sites. Gets overwritten on openclaw update.
Summary
On Windows, the
runCommandWithTimeoutandrunExecfunctions inexec-CLVZ7JOg.js(source:src/process/exec.ts) spawn child processes viachild_process.spawn()andchild_process.execFile()without settingwindowsHide: true. This causes a brief black console window flash every time an agent executes a tool command.Other spawn sites in the codebase correctly set
windowsHide: true:acp-cli→resolveWindowsSpawnProgrampropagateswindowsHide)auth-profilesline ~40339 →windowsHide: true)windows-task-restart→windowsHide: true)But the two most frequently called exec paths do not:
1.
runCommandWithTimeout(spawn)2.
runExec(execFile)Expected behavior
All child process spawns on Windows should use
windowsHide: trueto prevent console window flashes, consistent with the rest of the codebase.Environment
gateway-silent.vbs(window style 0)Workaround
Manually patching the dist file to add
windowsHide: trueto both sites. Gets overwritten onopenclaw update.