Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bug: Windows orphaned coder ssh --stdio processes after interrupted Codex connection retries #27954

Description

@voarsh2

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When Codex Desktop retries connections to Coder workspaces over an unreliable network, it leaves orphaned Coder CLI proxy processes behind on Windows.

The orphan processes are coder-windows-amd64.exe invocations such as:

coder-windows-amd64.exe --global-config "<config-dir>" ssh --stdio <workspace>

After the connection attempts have ended, the processes have no live parent process, but remain running. Repeated retries accumulate them.

In one observed incident, 283 orphaned processes remained:

  • 153 for one workspace alias
  • 130 for another workspace alias

Each process was roughly 25 MB, making the combined working set approximately 7 GB before additional per-process overhead. Manual cleanup required taskkill /F /IM coder-windows-amd64.exe.

This seems related to #6712, which was closed as fixed, but this case is specifically an accumulation of orphaned Windows processes during automated connection retry/cancellation.

Relevant Log Output

Coder v2.28.0+1b1e3cb Tue Nov  4 17:11:37 UTC 2025
https://github.com/coder/coder/commit/1b1e3cb706b899e0779f1561e088ee8cbd3f6aaf

Observed command pattern:
coder-windows-amd64.exe --global-config "<config-dir>" ssh --stdio <workspace>

Observed after cleanup check:
- 283 matching processes before cleanup
- all 283 had an exited parent process
- 0 remaining after taskkill /F /IM coder-windows-amd64.exe

Expected Behavior

When the SSH client or Codex cancels, abandons, or fails a connection attempt, the associated coder ssh --stdio proxy process should exit promptly. Retried connections must not leave orphaned processes or accumulate memory.

Steps to Reproduce

  1. On Windows, configure Codex Desktop remote workspace connections to use Coder SSH aliases (which invoke coder ssh --stdio <workspace> as the SSH ProxyCommand).
  2. Use an unreliable network connection, or interrupt connectivity while Codex is attempting/retrying remote workspace connections.
  3. Allow Codex to retry connections over time.
  4. Inspect Task Manager or PowerShell for coder-windows-amd64.exe processes.
  5. Observe that many ssh --stdio processes remain after the associated attempts have ended, with no live parent process.

Environment

  • Host OS: Windows 11
  • Coder version: v2.28.0+1b1e3cb (2025-11-04)
  • Client usage: Codex Desktop remote workspace connections via SSH ProxyCommand
  • Affected command: coder-windows-amd64.exe ... ssh --stdio <workspace>

Additional Context

No response

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions