openai / openai/codex-plugin-cc
spawnBrokerProcess() missing windowsHide: true — leftover spawn site from #67
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 33.3k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Summary
spawnBrokerProcess() in plugins/codex/scripts/lib/broker-lifecycle.mjs is missing windowsHide: true in its spawn() options. On Windows, the detached broker process gets its own visible console window.
#67 fixed this class of bug by adding windowsHide: true to the other spawn sites — lib/app-server.mjs (codex app-server), lib/process.mjs (runCommand), and codex-companion.mjs (spawnDetachedTaskWorker) all have it in v1.0.5 — but the broker spawn site was missed.
Location
plugins/codex/scripts/lib/broker-lifecycle.mjs, spawnBrokerProcess():
const child = spawn(process.execPath, [scriptPath, "serve", "--endpoint", endpoint, "--cwd", cwd, "--pid-file", pidFile], {
cwd,
env,
detached: true,
stdio: ["ignore", logFd, logFd]
// <-- windowsHide: true missing here
});
Impact
Whenever ensureBrokerSession() needs to (re)spawn the broker on Windows, a console window appears and stays open for the lifetime of the broker process. Because the window is visible and closable, users are also likely to close it manually — killing the broker — which makes the next connect probe fail and respawn yet another visible window, so the problem repeats instead of happening once.
Fix
One line, same as the other spawn sites:
detached: true,
windowsHide: true,
stdio: ["ignore", logFd, logFd]
Environment
- codex plugin v1.0.5 (commit 80c31f9), Claude Code 2.1.200
- Windows 11, Node.js v24.16.0
Verified locally by patching the installed plugin — the visible console window no longer appears.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open plugins/codex/scripts/lib/broker-lifecycle.mjs and inspect spawnBrokerProcess(), then compare its spawn options with the other spawn sites named in the issue. Done means the broker no longer opens a visible console window on Windows when ensureBrokerSession() spawns or respawns it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 92/100