Skip to content

Windows: every spawned console process flashes a black window (git.exe ~1/sec on v2.0.20) — re-report of #22414, #31629 #52266

Open

Description

@herjarsa

Description

On Windows, every console-subsystem process opencode spawns allocates a visible console window, because the spawn does not pass CREATE_NO_WINDOW. The windows open and close instantly — roughly 1 per second.

git.exe is the most visible case. From ~/.local/share/opencode/log/opencode.log:

message="spawning process" command="C:\Program Files\Git\cmd\git.EXE"
  args="[\"--git-dir\",\"C:\Users\herna\.config\opencode\.git\",\"--work-tree\",...]"

Rate: 417 git.exe spawns in the last 20 000 log lines, 60-68 per minute, in bursts of ~6 within 350 ms. They come from the project repo and from the snapshot repo (~/.local/share/opencode/snapshot/<id>/.git).

Same for any local MCP whose command is a console binary (node.exe, python.exe): one window per MCP start.

Mechanism: a console-subsystem child of a GUI-subsystem parent calls AllocConsole(). Only the spawner can suppress it, via CREATE_NO_WINDOW or DETACHED_PROCESS.

Previously reported and closed administratively rather than fixed: #22414 and #31629 (60-day inactivity), #38715 (auto-closed), #42440 (COMPLETED, but last comment is "I will screen record it later today if you still cant replicate it"). Still reproduces on v2.0.20.

Plugins

@herjarsa/omo-meta-governor@latest
opencode-omniroute-plugin@latest
superpowers@git+https://github.com/obra/superpowers.git

OpenCode version

v2.0.20

Steps to reproduce

1. Windows 11, open the desktop app with a few projects open.
2. Work normally (or open a session in an active project).
3. Watch for black console windows opening and closing ~1 per second.

Confirmed by log count rather than by eye: count spawning process lines mentioning git.EXE in opencode.log.

Screenshot and/or share link

No screenshot: the windows close in under a second, so a capture is not practical. Log excerpt above is the reproducible evidence.

Operating System

Microsoft Windows 11 Pro Insider Preview  build 28120.10.0.28120

Terminal

Windows Terminal 1.24.11911.0  (also affects the desktop app, which spawns without a terminal host)

Notes

Workarounds tried, all of which failed:

  • Delegated console host via HKCU\Console\%%Startup — made it worse, any console app started an endless window loop.
  • Windows Terminal windowingBehavior: "useExisting" — no effect.
  • A GUI-subsystem launcher wrapping each MCP with CreateNoWindow + stdio relay — works with file-redirected stdio, but under opencode live pipes every MCP fails with mcp connect failed ... "Request timed out".
  • Removing cmd.exe/npx shims from MCP definitions — fewer processes, but node.exe is still a console app, so the window remains.

"snapshots": false reduces the churn (it removes the snapshot-repo git calls) but costs file undo/revert, and does not affect project-repo git calls.

Activity

  1. added
    needs:complianceThis means the issue will auto-close after 2 hours.
    and removed
    needs:complianceThis means the issue will auto-close after 2 hours.
    on Sep 30, 2026
  2. github-actions commented on Sep 30, 2026

    @github-actions
    Contributor

    Thanks for updating the issue with the Bug Report template and the reproduction and system details. It now meets our issue guidelines.

  3. lovesans commented on Sep 30, 2026

    @lovesans

    1.18.33 same problem

  4. CN6 commented on Oct 8, 2026

    @CN6

    Environment

    • OpenCode version: Desktop 2.0.24 (@opencode-aidesktop, bundled resources/opencode-cli.exe)
    • OS: Windows 11 Insider build 10.0.28020; default terminal: Windows Terminal
    • Plugins: superpowers@git+https://github.com/obra/superpowers.git, opencode-skills-collection@latest

    Reproduction

    1. Launch the OpenCode desktop app on Windows.
    2. A black console window (git) flashes once, immediately at startup.
    3. Reproduces on every launch observed today.

    Evidence

    The flash coincides with the startup worktree probe in ~/.local/share/opencode/log/opencode.log:

    timestamp=2026-10-08T09:15:55.127Z level=WARN message="worktree discovery failed"
      directory="D:\opencode-data" strategy=git error=Worktree.DirectoryUnavailableError http.span=1184ms
    

    No config switch exists for worktree discovery, so opencode.jsonc cannot work around it.

    Cross-ref: #52281, #53730, #50868 (open) / #31629, #42440, #22414 (closed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions