You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Client can't connect to server in sbx sandbox #50533
I am launching opencode in an sbx sandbox with the following command :
sbx run opencode . -- --hostname 0.0.0.0 --port 4096
Although the server binds to 0.0.0.0 fine, the client side fails to connect in the sandbox, with the error :
at <anonymous> (/$bunfs/root/chunk-pf78enbq.js:8:7615)
at processTicksAndRejections (native:7:39)
I can replicate this in the sandbox with a separate opencode serve ... and opencode attach ... commands. the serve works fine, the attach fails with the same error.
The problem seems to be that the url that the client uses to connect is constructed from the passed hostname (0.0.0.0), and this is a non-routable address for connections.
Proposed fix
I suggest translating the wildcard bind address to a loopback address when the TUI worker returns the URL to its local client.
Activity
github-actions commentedon Sep 22, 2026
This issue might be a duplicate of existing issues. Please check:
http://0.0.0.0:<port>as its URL, and the client connects to it verbatim. That issue also notes that the Desktop client already rewrites the wildcard address to loopback, and proposes the same fix for the CLI/TUI worker.