anomalyco / anomalyco/opencode
Workspace sync hangs in `connecting` forever when the target accepts but never answers
@jlongster is already working on this.
Since Aug 8, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
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
netlistener is enough). - Start sync for that workspace.
- Status reports
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.