Skip to content

fix(coding-agent): hide Windows console windows for spawned subprocesses - #1140

Open
warmshao wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
warmshao:fix/windows-console-popups
Open

fix(coding-agent): hide Windows console windows for spawned subprocesses#1140
warmshao wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
warmshao:fix/windows-console-popups

Conversation

@warmshao

@warmshao warmshao commented Aug 10, 2026

Copy link
Copy Markdown

Problem

On Windows, a console-less parent process (the daemon and its session workers) spawning a console-subsystem child (node, python, git, npm via its cmd shim, taskkill, …) makes conhost pop a visible console window for the child; detached: true forces a brand-new console outright. In practice users see console windows flashing during agent activity — e.g. session-worker spawns whose console ends up titled with the ipython kernel command line, and cmd.exe flashes on shell: true/execSync paths.

An earlier pass added windowsHide to the kernel/bootstrap/exec/session-lease spawns; this PR sweeps all the remaining spawn sites:

  • Daemon/worker launches (detached: true): session-worker spawn + replacement in the supervisor, daemon launch, background daemon start, replacement supervisor, update-restart coordinator
  • Daemon children: catalog process, RPC client
  • High-frequency paths: bash tool spawn, killProcessTree's taskkill, autonomous runner, footer git probes
  • Infrequent paths: package manager command steps/capture, self-update steps, !command config-value resolution (execSync fallback), where bash.exe detection, git context capture, clipboard tools (incl. the WSL powershell read), tool detection, session-file trash

Compatibility

windowsHide is ignored on non-Windows platforms, so this is a no-op elsewhere. No behavior change beyond suppressing the stray console windows.

🤖 Generated with Claude Code

Note

Hide Windows console windows for all spawned subprocesses in coding-agent

Adds windowsHide: true to every spawn, spawnSync, execFile, and execSync call across the coding-agent package so that no console windows flash on screen when the agent spawns subprocesses on Windows. The change covers daemon lifecycle, session workers, bash tools, git helpers, clipboard utilities, package manager commands, and RPC client launches.

Macroscope summarized 5457e40.

On Windows, a console-less parent (the daemon and its session workers)
spawning a console-subsystem child (node, python, git, npm via cmd shim,
taskkill, ...) makes conhost pop a visible window for it; detached:true
forces a brand-new console outright. Users see console windows flashing
during agent activity — worker spawns titled with the ipython kernel
command line, cmd.exe flashes on shell:true/execSync paths.

An earlier pass covered the kernel/bootstrap/exec/lease spawns; this
sweeps the rest: daemon/worker/catalog/update-coordinator launches, the
bash tool, killProcessTree's taskkill, autonomous/rpc spawns, package
manager command steps, config value and git resolution, clipboard tools,
tool detection, session trash, and the footer's git probe.

windowsHide is ignored on non-Windows platforms, so this is a no-op
elsewhere.

Co-Authored-By: Claude <noreply@anthropic.com>
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