openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

feat: add `hide_window` config option to suppress console window on Windows shell execution

Open zixingaaaa opened this issue 5 months ago • 1 comments

Feature Request

Add a hide_window = true config option under a [shell] section that, when enabled, passes CREATE_NO_WINDOW (0x08000000) to the Windows process creation flags when the shell tool spawns child processes.

Problem

On Windows, every time the shell tool runs a command, a console window pops up briefly. This is disruptive for automated/scheduled pipeline scripts running in the background, daemon mode users, and multi-command workflows.

Current Behavior

std::process::Command on Windows defaults to creating a visible console window for child processes. No user-facing knob to change this.

Proposed Solution

Add in config.toml:

[shell]
hide_window = true

When true, include CREATE_NO_WINDOW (0x08000000) in dwCreationFlags via std::os::windows::process::CommandExt.

Additional Context

  • Windows only (no-op on macOS/Linux)
  • Backward compatible: default false
  • Implementation: .creation_flags(0x08000000) via CommandExt

Alternatives Considered

  • VBScript wrappers -- works but hacky
  • Documenting workaround -- doesn't solve UX

zixingaaaa avatar Jun 16 '26 17:06 zixingaaaa

Picking this one up. Will add the [shell] hide_window knob so the shell tool can pass CREATE_NO_WINDOW on Windows, defaulting off. #3728 looks like a duplicate of this one, so I will fold it into the same PR.

obchain avatar Jun 17 '26 14:06 obchain