Repository navigation
Conversation
The detached background sync has no console on Windows, so each console program it starts without windowsHide opens a new visible terminal window.
The local rebuild resolved newer dependency versions (no lockfile) and churned 3k lines of the bundle, which contains none of the changed spawn sites.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows, every background sync flashes a terminal window, and so does every Codex summarizer call. The
SessionStarthook runssync --background, which re-spawns itself withdetached: true. On Windows a detached child gets no console. Any console program that child starts withoutwindowsHide: true(codex --version,codex app-server) then gets a brand-new visible console window, which in Windows 11 is a Windows Terminal window. A session that resumes often, or a sync with many Codex transcripts to summarize, opens a steady stream of these windows.This change adds
windowsHide: trueto the fourspawn()calls insrc/: the detached background sync insync-cli.ts, the two Codex summarizer spawns insummarizer.ts(version check andapp-server), and theapp-serverprobe incodex-hook-trust.ts. On other platforms the option does nothing. The Claude summarizer path was already fine, because the Agent SDK passeswindowsHideitself.test/spawn-windows-hide.test.tsscans everyspawn(call insrc/and fails if its options lackwindowsHide: true, so a future spawn can't bring the windows back. Before the fix it failed on all four calls; after the fix it passes.How it was checked, on Windows 11 with Node 24:
cmd /c timeout 2withoutwindowsHideopens a new Windows Terminal window, detected by enumerating visible top-level windows. The same spawn withwindowsHide: trueopens none.sync --background(copy, index, summaries) for 3 minutes. No new console window appeared.npm run buildwas run, and the rebuiltdist/files for the three changed modules are committed alongsidesrc/. I leftdist/mcp-server.jsas upstream has it. Without a lockfile my rebuild pulled newer dependencies and changed about 3k lines of that bundle, and the bundle contains none of these spawn calls.npm test: 4 tests fail both before and after this change on Windows:file-lockI/O propagation, themcp-server-wrapperSIGTERM test, and twoparserreal-data path tests. They look Windows-specific and are unrelated to this change. No new failures.