You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows, a transient "Windows PowerShell" console window pops up at proxy startup, on config changes, and at shutdown, when the proxy runs from a headless (console-less) parent.
Root cause: src/codex/user-identity.ts resolves the effective Windows identity by spawning powershell.exe via Bun.spawnSyncwithoutwindowsHide: true (verified: zero windowsHide occurrences in that file in v2.11.0). The resolution is not cached and is hit by every write-coordination path (startup injection/catalog reconciliation, config mutation → catalog/write-lock serialization, shutdown → native Codex restore), so each of those moments allocates a fresh visible console for the child.
This is distinct from#1236: that issue is the persistentbun.exe console window created by the npm launcher (bin/ocx.mjs → bun spawn, now fixed in PR #1268). This one is created by the proxy itself, after the launcher is gone, and closes as soon as the PowerShell child exits. I verified on a running instance that the proxy process owns no console window (enumerated ConsoleWindowClass windows), so the two windows are not the same artifact — and after #1268 lands, the launcher path becomes console-less and will hit this same transient-window bug.
Reproduction
Install the published npm package on Windows: npm install -g @bitkyc08/opencodex (v2.11.0).
Start the proxy from a headless context so the proxy itself has no console (e.g., dashboard "Drain & restart", or the detached ocx start path).
Trigger an identity resolution: proxy startup, saving a config change (secret/catalog writes), or shutdown (native Codex restore writes through the write path).
Also reproduced in isolation with the bundled Bun 1.3.14: spawning powershell.exe from a console-less parent without windowsHide gives the child a visible console (GetConsoleWindow non-zero, window visible); with windowsHide: true the child has no console at all (hwnd = 0). So the fix is purely to add the flag (or avoid the PowerShell child entirely) on the proxy-internal spawn.
Version
2.11.0 (reproduced on 2.11.0-preview.20260808; source on main and dev has the same omission)
Operating system
Windows 11 (any Windows with a console host; reproduced on build 26200)
Provider and model
Not provider-specific.
Logs or error output
No logs. The popup is the child console of the powershell.exe launched from src/codex/user-identity.tspowershellValue() / localAppDataValue() (Bun.spawnSync without windowsHide), triggered on every write-coordination identity lookup.
That PR expanded beyond the popup defect into broader Windows identity and process-introspection changes and was closed unmerged after review identified cross-platform and fallback concerns.
Client or integration
OpenCodex dashboard (also
ocxCLI)Area
Platform (Windows / macOS / Linux)
Summary
On Windows, a transient "Windows PowerShell" console window pops up at proxy startup, on config changes, and at shutdown, when the proxy runs from a headless (console-less) parent.
Root cause:
src/codex/user-identity.tsresolves the effective Windows identity by spawningpowershell.exeviaBun.spawnSyncwithoutwindowsHide: true(verified: zerowindowsHideoccurrences in that file in v2.11.0). The resolution is not cached and is hit by every write-coordination path (startup injection/catalog reconciliation, config mutation → catalog/write-lock serialization, shutdown → native Codex restore), so each of those moments allocates a fresh visible console for the child.This is distinct from #1236: that issue is the persistent
bun.execonsole window created by the npm launcher (bin/ocx.mjs→ bun spawn, now fixed in PR #1268). This one is created by the proxy itself, after the launcher is gone, and closes as soon as the PowerShell child exits. I verified on a running instance that the proxy process owns no console window (enumeratedConsoleWindowClasswindows), so the two windows are not the same artifact — and after #1268 lands, the launcher path becomes console-less and will hit this same transient-window bug.Reproduction
npm install -g @bitkyc08/opencodex(v2.11.0).ocx startpath).Also reproduced in isolation with the bundled Bun 1.3.14: spawning
powershell.exefrom a console-less parent withoutwindowsHidegives the child a visible console (GetConsoleWindownon-zero, window visible); withwindowsHide: truethe child has no console at all (hwnd = 0). So the fix is purely to add the flag (or avoid the PowerShell child entirely) on the proxy-internal spawn.Version
2.11.0 (reproduced on
2.11.0-preview.20260808; source onmainanddevhas the same omission)Operating system
Windows 11 (any Windows with a console host; reproduced on build 26200)
Provider and model
Not provider-specific.
Logs or error output
No logs. The popup is the child console of the
powershell.exelaunched fromsrc/codex/user-identity.tspowershellValue()/localAppDataValue()(Bun.spawnSyncwithoutwindowsHide), triggered on every write-coordination identity lookup.Current implementation status
The original implementation attempt was PR #1279.
That PR expanded beyond the popup defect into broader Windows identity and process-introspection changes and was closed unmerged after review identified cross-platform and fallback concerns.
The focused replacement is:
fix(windows): stop console popups from proxy-internal PowerShell lookups (#1278)#1347 keeps the existing PowerShell-based behavior but hardens the affected spawn sites by:
PATH;windowsHide: true;The PR also reports a real-machine Windows end-to-end verification covering:
The popup no longer reproduced on that branch.
This issue should remain open until the focused fix is accepted and merged into
dev.Redacted configuration
None needed.
Checks