Skip to content

fix(runtime): stop the Windows daemon from opening a visible console - #173

Open
Silversun31 wants to merge 1 commit into
google:mainfrom
Silversun31:fix/windows-daemon-console-window
Open

Silversun31 wants to merge 1 commit into
google:mainfrom
Silversun31:fix/windows-daemon-console-window

Conversation

@Silversun31

Copy link
Copy Markdown

Fixes #172

Windows ignores CREATE_NO_WINDOW when it is combined with DETACHED_PROCESS. The venv
python.exe is a launcher, so the real interpreter it starts got a new visible console, and
closing that window killed the server.

spawn_daemon now uses CREATE_NEW_PROCESS_GROUP | CREATE_NO_WINDOW, the same flags the
worker processes already use (apps/admin_console/services/worker_process_io.py). The daemon
still outlives the terminal that started it.

test_spawn_daemon asserts the flags on Windows; it fails on the previous code.

Tested on Windows 11 with a uv venv: uv run artemis restart --no-open no longer shows a window
and the API answers. ruff format --check, ruff check, scripts/quality_ratchet.py,
pyright --project pyright-core.json and pytest (2528 passed) are clean.

🤖 Generated with Claude Code

@google-cla

google-cla Bot commented Oct 6, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Windows ignores CREATE_NO_WINDOW when it is combined with DETACHED_PROCESS.
The venv python.exe is a launcher, so the real interpreter it starts got a
new visible console, and closing that window killed the server.

Fixes google#172
@Silversun31
Silversun31 force-pushed the fix/windows-daemon-console-window branch from 6751a6e to 4097919 Compare October 6, 2026 20:08
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.

artemis restart opens an empty, visible console window on Windows (venv launcher + DETACHED_PROCESS)

1 participant