Skip to content

Windows: subprocess spawn (git, codegraph, etc.) flashes console window #31629

Closed as not planned

Description

@yuigahamaaa

Description

Description

When using the opencode Desktop on Windows (v1.14.49), every subprocess spawned via the bash/shell tool briefly opens a new console window (git.exe, powershell.exe, codegraph.cmd, etc.) which then immediately disappears. This causes a distracting flashing effect on the desktop.

Affected Commands

  • Any bash tool call → powershell.exe → child process (git.exe, sha256sum, etc.)
  • MCP tools that use .cmd scripts (e.g., codegraph.cmd)
  • git-commit and code-review-gate skills that frequently invoke git diff, git status, git add, git commit

Root Cause

The Electron/Node.js child_process.spawn calls in opencode's desktop app do not set the Windows CREATE_NO_WINDOW flag. Node.js spawn accepts the windowsHide: true option, which when combined with stdio: 'pipe', passes CREATE_NO_WINDOW (0x08000000) to CreateProcessW, suppressing the new console window.

Expected Behavior

// Current (flashes):
child_process.spawn('powershell.exe', ['-Command', 'git status'])

// Fixed (no flash):
child_process.spawn('powershell.exe', ['-Command', 'git status'], {
  windowsHide: true,
  stdio: 'pipe'
})

### Plugins

codegraph

### OpenCode version

opencode Desktop v1.14.49

### Steps to reproduce

### Description

When using the opencode Desktop on Windows (v1.14.49), every subprocess spawned via the `bash`/`shell` tool briefly opens a new console window (git.exe, powershell.exe, codegraph.cmd, etc.) which then immediately disappears. This causes a distracting flashing effect on the desktop.

### Affected Commands

- Any `bash` tool call → `powershell.exe` → child process (git.exe, sha256sum, etc.)
- MCP tools that use `.cmd` scripts (e.g., `codegraph.cmd`)
- `git-commit` and `code-review-gate` skills that frequently invoke `git diff`, `git status`, `git add`, `git commit`

### Root Cause

The Electron/Node.js `child_process.spawn` calls in opencode's desktop app do not set the Windows `CREATE_NO_WINDOW` flag. Node.js `spawn` accepts the `windowsHide: true` option, which when combined with `stdio: 'pipe'`, passes `CREATE_NO_WINDOW` (0x08000000) to `CreateProcessW`, suppressing the new console window.

### Expected Behavior

```js
// Current (flashes):
child_process.spawn('powershell.exe', ['-Command', 'git status'])

// Fixed (no flash):
child_process.spawn('powershell.exe', ['-Command', 'git status'], {
  windowsHide: true,
  stdio: 'pipe'
})

### Screenshot and/or share link

_No response_

### Operating System

Windows 10/11

### Terminal

_No response_

Activity

  1. github-actions commented on Aug 10, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  2. MrDoe commented on Oct 5, 2026

    @MrDoe

    I have the same issue on OpenCode 2.0.23.

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

Metadata

Metadata

Assignees

No one assigned

    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