Description
The workspace sync loop's connectSSE has no timeout on the connect phase. If a sync target accepts the TCP connection but never returns response headers, the fiber hangs inside http.execute forever: the workspace status stays connecting, nothing is logged, and the loop's retry/backoff below never runs.
It cannot heal itself afterwards either: startSync returns early while a fiber exists and the status is not error, so later sync starts are no-ops. Only restarting the server clears it.
We hit this in a real deployment where a loopback transport proxy accepted the connection during a startup race but didn't answer; the workspace showed connecting for 20+ minutes while direct curl to the same endpoint answered instantly.
Plugins
opencode-container-workspace (custom workspace adapter)
OpenCode version
1.18.12 (code path unchanged on current dev)
Steps to reproduce
- Register a workspace whose sync target accepts connections but never writes response headers (a bare
net listener is enough).
- Start sync for that workspace.
- Status reports
connecting indefinitely, no warning is logged, and subsequent sync starts do nothing.
Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
Windows Terminal
Description
The workspace sync loop's
connectSSEhas no timeout on the connect phase. If a sync target accepts the TCP connection but never returns response headers, the fiber hangs insidehttp.executeforever: the workspace status staysconnecting, nothing is logged, and the loop's retry/backoff below never runs.It cannot heal itself afterwards either:
startSyncreturns early while a fiber exists and the status is noterror, so later sync starts are no-ops. Only restarting the server clears it.We hit this in a real deployment where a loopback transport proxy accepted the connection during a startup race but didn't answer; the workspace showed
connectingfor 20+ minutes while direct curl to the same endpoint answered instantly.Plugins
opencode-container-workspace (custom workspace adapter)
OpenCode version
1.18.12 (code path unchanged on current dev)
Steps to reproduce
netlistener is enough).connectingindefinitely, no warning is logged, and subsequent sync starts do nothing.Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
Windows Terminal