Is there an existing issue for this?
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
- On Windows, configure Codex Desktop remote workspace connections to use Coder SSH aliases (which invoke
coder ssh --stdio <workspace> as the SSH ProxyCommand).
- Use an unreliable network connection, or interrupt connectivity while Codex is attempting/retrying remote workspace connections.
- Allow Codex to retry connections over time.
- Inspect Task Manager or PowerShell for
coder-windows-amd64.exe processes.
- 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
Is there an existing issue for this?
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.exeinvocations such as: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:
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
Expected Behavior
When the SSH client or Codex cancels, abandons, or fails a connection attempt, the associated
coder ssh --stdioproxy process should exit promptly. Retried connections must not leave orphaned processes or accumulate memory.Steps to Reproduce
coder ssh --stdio <workspace>as the SSH ProxyCommand).coder-windows-amd64.exeprocesses.ssh --stdioprocesses remain after the associated attempts have ended, with no live parent process.Environment
coder-windows-amd64.exe ... ssh --stdio <workspace>Additional Context
No response