Pull requests / #1883
#1883 serve: on Windows the engine and the image encoder start without a console window of their own
open · @LeGeRyChEeSe · 0 comments · View on GitHub
Server & APIModels & quantsWindows
Description
## Title Issue: none found (searched 2026-10-10: console window, CREATE_NO_WINDOW). ## Summary When the server has no console - started with `pythonw`, as a service, or by a launcher that hides it - Windows gives each console program it starts a **new, visible** console window: one for `strata.exe`, one for the image encoder, again at every engine restart. Their output already goes through pipes and the log, so the window is empty, and closing it by mistake ends the engine. `popen()` (the #735 wrapper both use) now passes `creationflags=CREATE_NO_WINDOW` on Windows, as `serve/mcp.py` already does for MCP servers. A caller's own `creationflags` wins. Nothing changes elsewhere, and nothing changes for a server started from a console (the child's console was the parent's, and its I/O is redirected). The job object of `serve/winjob.py` still ties the children to the server's lifetime. ## Test - `serve/test_server.py`, `test_no_console_window_on_windows`: the flag on Windows, absent elsewhere, a caller's own flags kept. - Live check on Windows 11: a `pythonw` parent starts a console child that prints `GetConsoleWindow()`. With `subprocess.Popen` it gets a window (non-zero handle); through `popen()` it gets none (0).
Related on strata.com
Editorial links to help you install, pick models, or read release notes — not part of the upstream thread.