Skip to content

fix(electron): hide Windows background consoles#16842

Merged
Hona merged 8 commits intoanomalyco:devfrom
Hona:fix/windows-electron-hide-console-flash
Mar 11, 2026
Merged

fix(electron): hide Windows background consoles#16842
Hona merged 8 commits intoanomalyco:devfrom
Hona:fix/windows-electron-hide-console-flash

Conversation

@Hona
Copy link
Member

@Hona Hona commented Mar 10, 2026

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.

Prevent Electron on Windows from flashing transient terminal windows during background work by hiding shell, helper, and LSP subprocess consoles.
Copilot AI review requested due to automatic review settings March 10, 2026 03:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 windowsHide for the shared Process.spawn helper on Windows.
  • Set windowsHide for shell-based background command execution (bash tool + prompt shell execution).
  • Wrap LSP server/client spawns to consistently apply windowsHide on 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.

Hona added 3 commits March 10, 2026 13:43
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.
@Hona Hona merged commit 4ab35d2 into anomalyco:dev Mar 11, 2026
8 checks passed
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.

3 participants