fix(windows): hide the console windows of spawned child processes - #1448
fix(windows): hide the console windows of spawned child processes#1448mlandolfi90 wants to merge 1 commit into
Conversation
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
Signed-off-by: mlandolfi90 <mlandolfi90@users.noreply.github.com>
795797c to
9354930
Compare
Windows reproduction (focus-steal) — confirms this PR is neededHost: Windows 11, codebase-memory-mcp 0.9.0, Cursor + Claude Code MCP stdio. Symptom: With Mitigation that works today: Query tools remain usable; only continuous watch/reindex is unsafe until Ask: Please prioritize merge/release — this is a usability blocker on Windows for anyone leaving the MCP connected with the watcher on. |
Two
CreateProcessWcall sites insrc/foundation/spawn children withoutCREATE_NO_WINDOW, so on Windows each one flashes a console window:cbm_subprocess_spawn_win(src/foundation/subprocess.c) — the supervisor → index-worker spawn.cbm_popen_isolated(src/foundation/compat_fs.c).src/daemon/bootstrap.calready passes the flag for the daemon self-spawn, so this brings the remaining two in line with it.User-visible effect: when the MCP server is driven by an editor/agent over stdio, indexing a repository pops console windows onto the desktop — one per worker spawn. Nothing breaks, but on a machine that reindexes on file changes it is a steady stream of windows stealing focus.
CREATE_NO_WINDOWonly suppresses console allocation; it does not detach the process, change the process group, or affect the inherited handle list, so the existingEXTENDED_STARTUPINFO_PRESENT | CREATE_SUSPENDED | CREATE_NEW_PROCESS_GROUPsemantics and the worker-log handle plumbing are untouched.🤖 Generated with Claude Code