Skip to content

windows: console window flashes on every subprocess spawn (v2 next build) #42440

Description

@Egzza

Summary

On Windows, every time the agent runs a shell command (git, node, PowerShell, etc.), a console window briefly flashes open and then disappears. This happens for every command execution during a session.

Environment

  • opencode version: 0.0.0-next-17428
  • OS: Windows 11 Home 25H2, build 10.0.26200.8875 (win32 x64)
  • Terminal: TERM=xterm-256color, COLORTERM=truecolor (opencode TUI)
  • Shell: C:\WINDOWS\system32\cmd.exe
  • Install/channel: next (@opencode-ai/[email protected])
  • Active plugins: herdr-agent-state.js, rtk.ts

Reproduction

  1. Run opencode2 on Windows.
  2. Ask the agent to perform any task that runs a shell command (e.g. git status, ls, or any command).
  3. Observe a console window flash on screen each time a command runs.

Expected Behavior

Subprocesses spawned for shell command execution run silently with no visible console window.

Actual Behavior

A black console window briefly appears and closes for every subprocess spawn. This is caused by subprocess spawning on Windows not setting the CREATE_NO_WINDOW creation flag (windowsHide: true in Node.js, HideWindow: true in Go's syscall.SysProcAttr).

Additional Context

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions