Skip to content

Windows: coder.exe ProxyCommand creates visible console window #24046

@EhabY

Description

@EhabY

Problem

On Windows, when VS Code forks (Windsurf, Antigravity) use coder ssh --stdio as an SSH ProxyCommand, a visible console window is created for coder.exe. Closing that window kills the SSH connection.

This happens because coder.exe is built as a console subsystem application. When the parent process (ssh.exe) doesn't suppress window creation (via CREATE_NO_WINDOW), Windows allocates a new visible console for the child. Stock VS Code's Remote SSH extension avoids this by spawning ssh.exe with CREATE_NO_WINDOW, but Windsurf and Antigravity do not.

The fix cannot come from the vscode-coder extension side — it only writes the ProxyCommand string into SSH config and doesn't control process creation flags.

Suggested Fix

When --stdio is passed to coder ssh, the CLI only needs stdin/stdout piping and never uses interactive console I/O. On Windows, the binary could call FreeConsole() early in the --stdio path, or be built with -H windowsgui for the Windows target so no console is allocated at all.

Related

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