Client or integration
OpenCodex dashboard (also ocx CLI / npm launcher)
Area
Platform (Windows / macOS / Linux)
Summary
On Windows, a visible console (terminal) window pops up every time the proxy starts or restarts from a headless parent — for example the dashboard "Drain & restart" action, a Task Scheduler / desktop-shortcut launch, or a GUI update restart. The window belongs to the Bun child process and stays open while the proxy runs, which is confusing and makes users think the proxy is a terminal app (or they close it and kill the proxy).
Root cause: the npm bin launcher bin/ocx.mjs spawns the Bun runtime with stdio: "inherit" but omits windowsHide: true. When the launcher itself has no console window (detached spawn, scheduler, shortcut), Node's spawn with stdio: "inherit" causes Windows to allocate a brand-new visible console for the Bun child. Running ocx from an existing terminal hides the problem because the child inherits that console. All other detached spawns in the codebase already set windowsHide: true (e.g. src/cli/index.ts, system-restart.ts); only the launcher's final spawn is missing it.
Reproduction
- Install the published npm package on Windows:
npm install -g @bitkyc08/opencodex
- Start the proxy from a headless context, e.g. open the Web UI and trigger "Drain & restart" (
POST /api/system/restart), or launch ocx from a Task Scheduler task / desktop shortcut.
- Observe a new visible console window appearing, running
...\bun.exe ...\src\cli\index.ts start --port 10100.
- Closing that window terminates the proxy (all routed models disconnect).
Expected: no window appears for background launches; the proxy keeps running with windowsHide: true.
Version
2.10.2 (reproduced on 2.10.2-preview.20260806; source on main and dev has the same omission)
Operating system
Windows 11 (any Windows version with a console host)
Provider and model
Not provider-specific.
Logs or error output
No logs needed; the running process is visible via Task Manager as bun.exe with a console window.
Screenshots and supporting files
n/a
Redacted configuration
Checks
Client or integration
OpenCodex dashboard (also
ocxCLI / npm launcher)Area
Platform (Windows / macOS / Linux)
Summary
On Windows, a visible console (terminal) window pops up every time the proxy starts or restarts from a headless parent — for example the dashboard "Drain & restart" action, a Task Scheduler / desktop-shortcut launch, or a GUI update restart. The window belongs to the Bun child process and stays open while the proxy runs, which is confusing and makes users think the proxy is a terminal app (or they close it and kill the proxy).
Root cause: the npm bin launcher
bin/ocx.mjsspawns the Bun runtime withstdio: "inherit"but omitswindowsHide: true. When the launcher itself has no console window (detached spawn, scheduler, shortcut), Node'sspawnwithstdio: "inherit"causes Windows to allocate a brand-new visible console for the Bun child. Runningocxfrom an existing terminal hides the problem because the child inherits that console. All other detached spawns in the codebase already setwindowsHide: true(e.g.src/cli/index.ts,system-restart.ts); only the launcher's final spawn is missing it.Reproduction
npm install -g @bitkyc08/opencodexPOST /api/system/restart), or launchocxfrom a Task Scheduler task / desktop shortcut....\bun.exe ...\src\cli\index.ts start --port 10100.Expected: no window appears for background launches; the proxy keeps running with
windowsHide: true.Version
2.10.2 (reproduced on
2.10.2-preview.20260806; source onmainanddevhas the same omission)Operating system
Windows 11 (any Windows version with a console host)
Provider and model
Not provider-specific.
Logs or error output
No logs needed; the running process is visible via Task Manager as
bun.exewith a console window.Screenshots and supporting files
n/a
Redacted configuration
{}Checks