Skip to content

fix(vscode): prevent Windows gh console flashes - #12936

Merged
marius-kilocode merged 1 commit into
mainfrom
fix-windows-terminal-command-display
Aug 6, 2026
Merged

fix(vscode): prevent Windows gh console flashes#12936
marius-kilocode merged 1 commit into
mainfrom
fix-windows-terminal-command-display

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

Fixes #12912

On Windows with Windows Terminal configured as the default terminal, Agent Manager background gh calls can cause older GitHub CLI releases to launch tzutil.exe as a visible child during local timezone lookup. Because gh is started hidden, the descendant is not hidden and can briefly steal focus.

This adds a single execGhRead boundary for Agent Manager read-only gh commands. On Windows, it preserves an existing TZ value and otherwise supplies TZ=UTC, preventing the CLI from falling back to tzutil.exe without changing write-capable command paths. PR status polling and PR import now use the boundary, and an architecture test prevents future Agent Manager gh literals from bypassing it.

@kilo-code-bot

kilo-code-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (7 files)
  • .changeset/fix-gh-windows-console.md
  • packages/kilo-vscode/AGENTS.md
  • packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts
  • packages/kilo-vscode/src/agent-manager/WorktreeManager.ts
  • packages/kilo-vscode/src/agent-manager/gh.ts
  • packages/kilo-vscode/tests/unit/agent-manager-arch.test.ts
  • packages/kilo-vscode/tests/unit/gh.test.ts

lgtm — the execGhRead boundary is well-scoped: it only injects TZ=UTC on win32 when no case-variant of TZ is set, delegates to the existing windowsHide-enforcing wrapper, and all former gh call sites (probe, PR view/list/checks, repo view, GraphQL comments, PR import) are routed through it with their original options intact. The arch test guards against future bypasses, and gh.test.ts exercises the real code path with a real child process instead of mocks. No new long-lived resources, so no leak potential.


Reviewed by kimi-k3 · Input: 61.4K · Output: 12.3K · Cached: 630.8K

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit e247578 into main Aug 6, 2026
24 checks passed
@marius-kilocode
marius-kilocode deleted the fix-windows-terminal-command-display branch August 6, 2026 10:28
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…command-display

fix(vscode): prevent Windows gh console flashes
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.

VS Code extension spawns gh (GitHub CLI) with visible console windows — terminal flashes over fullscreen games

2 participants