Skip to content

fix(tags): hide git console window on Windows - #324

Merged
EyJunge1 merged 1 commit into
tickernelz:mainfrom
hu-ja-ja:fix/windows-hide-git-console-window
Oct 1, 2026
Merged

EyJunge1 merged 1 commit into
tickernelz:mainfrom
hu-ja-ja:fix/windows-hide-git-console-window

Conversation

@hu-ja-ja

Copy link
Copy Markdown
Contributor

Problem

On Windows a black console window flashes at plugin init and again after each session goes idle. getTags() shells out to git up to five times.

Cause

Windows opens a visible console for any child spawned without CREATE_NO_WINDOW when the parent has no console. The OpenCode v2 plugin host runs console-less (opencode serve --service), so these spawns surfaced windows. The host's own shell and snapshot git spawns pass the flag; this call site didn't.

Fix

windowsHide: true on the plugin's only child_process call site. Covers the git.cmd/git.bat shell path too, no-op on macOS/Linux.

Testing

  • prettier --check src/services/tags.ts
  • Windows 11 + opencode 2.0.19 (console-less plugin host): the window no longer appears on plugin init or idle auto-capture

Related: anomalyco/opencode#50868

The v2 plugin host runs without a console, so spawning git without `windowsHide` popped a visible console window for every call.
Copilot AI balanced review requested due to automatic review settings September 29, 2026 12:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused change correctly addresses the reported Windows behavior without affecting other platforms.

Review effort: Balanced
Findings: None

What changed in this PR

Adds Windows child-process hiding to prevent Git console windows flashing during tag collection.

Changes:

  • Sets windowsHide: true for all Git executions in the tags service.
  • Preserves existing behavior on macOS and Linux.
File Description
src/​services/​tags.ts Hides Windows console windows for Git child processes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@EyJunge1
EyJunge1 merged commit 338f83a into tickernelz:main Oct 1, 2026
1 check 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