Skip to content

fix: hide detached broker window on Windows - #451

Open
e345ee wants to merge 1 commit into
openai:mainfrom
e345ee:fix-broker-windows-hide
Open

fix: hide detached broker window on Windows#451
e345ee wants to merge 1 commit into
openai:mainfrom
e345ee:fix-broker-windows-hide

Conversation

@e345ee

@e345ee e345ee commented Jul 8, 2026

Copy link
Copy Markdown

Summary

  • Add windowsHide: true to the detached broker spawn path.
  • Add a focused unit test covering the broker spawn options.

Fixes #440.

Test plan

  • node --test tests/broker-lifecycle.test.mjs
  • git diff --check
  • npm test
  • npm run build

@e345ee
e345ee requested a review from a team July 8, 2026 07:14
@Wintersta7e

Copy link
Copy Markdown

The spawnImpl seam plus asserting the captured options is a better test than scanning source text — it proves the option actually reaches spawn, rather than that the string appears somewhere in the file.

Worth folding in while you're in here: there's a third spawn site with the same problem that neither #440 nor #441 covers. plugins/codex/scripts/stop-review-gate-hook.mjs spawns the companion with

spawnSync(process.execPath, [scriptPath, "task", "--json", prompt], {
  cwd, env: childEnv, encoding: "utf8", timeout: STOP_REVIEW_TIMEOUT_MS
});

and no windowsHide. Unlike the broker, that one runs at every turn end while the review gate is enabled, so on Windows it's a recurring console window rather than a one-off. lib/process.mjs already sets windowsHide: true on its own spawnSync, which makes the hook the odd one out.

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.

spawnBrokerProcess() missing windowsHide: true — leftover spawn site from #67

2 participants