fix(electron): hide Windows background consoles#16842
Merged
Hona merged 8 commits intoanomalyco:devfrom Mar 11, 2026
Merged
Conversation
Prevent Electron on Windows from flashing transient terminal windows during background work by hiding shell, helper, and LSP subprocess consoles.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces Windows console-window “flashing” by ensuring background child processes spawned from Electron/opencode run with hidden consoles on Windows, keeping startup and tool execution quiet.
Changes:
- Set
windowsHidefor the sharedProcess.spawnhelper on Windows. - Set
windowsHidefor shell-based background command execution (bash tool + prompt shell execution). - Wrap LSP server/client spawns to consistently apply
windowsHideon Windows.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/opencode/src/util/process.ts | Hide Windows consoles for all processes spawned via Process.spawn. |
| packages/opencode/src/tool/bash.ts | Hide Windows console for background bash tool subprocesses. |
| packages/opencode/src/session/prompt.ts | Hide Windows console for prompt-time shell subprocess execution. |
| packages/opencode/src/lsp/server.ts | Wrap LSP server spawns to enforce windowsHide on Windows. |
| packages/opencode/src/lsp/index.ts | Wrap configured LSP spawns to enforce windowsHide on Windows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Inline the one-off LSP windowsHide option and hide the Windows taskkill helper to keep the console-flash fix small and consistent.
Avoid detached Windows sidecar launches in Electron and hide the packaged CLI version check so opencode-cli.exe does not open transient console windows.
Brendonovich
requested changes
Mar 10, 2026
Brendonovich
approved these changes
Mar 11, 2026
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.
Prevent Electron on Windows from flashing transient terminal windows during background work by hiding shell, helper, and LSP subprocess consoles. This keeps startup and tool execution quiet without changing interactive terminal behavior.