Bind to Unix domain socket with a file descriptor #1403

Closed
opened 2026-02-16 17:30:49 -05:00 by yindo · 4 comments
Owner

Originally created by @xadenryan on GitHub (Aug 20, 2025).

Originally assigned to: @thdxr on GitHub.

I would like to be able to bind to a Unix domain socket with a file descriptor instead of binding the to host and port.

Looks like bun can do this: https://bun.com/docs/api/http#unix-domain-sockets

I think all we have to do is change the bun server binding to support the unix param.

My use case is for spinning up thousands of opencode instances in isolation so they can be tested in parallel without any shared state. I have a parser that parses out the message that prints the host and port that it currently binds to but this is flaky and I have to update it every time the text changes. It would be better if I can specify a file descriptor to the unix: param, then I don't have to go through the IP stack either.

Review of what needs to change in the Bun.serve call: https://opencode.ai/s/s7yqFUTh

Discord conversation: https://discord.com/channels/1391832426048651334/1394667004979445931/1407782275881631754

Originally created by @xadenryan on GitHub (Aug 20, 2025). Originally assigned to: @thdxr on GitHub. I would like to be able to bind to a Unix domain socket with a file descriptor instead of binding the to host and port. Looks like bun can do this: https://bun.com/docs/api/http#unix-domain-sockets I think all we have to do is change the bun server binding to support the `unix` param. My use case is for spinning up thousands of opencode instances in isolation so they can be tested in parallel without any shared state. I have a parser that parses out the message that prints the host and port that it currently binds to but this is flaky and I have to update it every time the text changes. It would be better if I can specify a file descriptor to the `unix:` param, then I don't have to go through the IP stack either. Review of what needs to change in the `Bun.serve` call: https://opencode.ai/s/s7yqFUTh Discord conversation: https://discord.com/channels/1391832426048651334/1394667004979445931/1407782275881631754
yindo closed this issue 2026-02-16 17:30:49 -05:00
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Author
Owner

@BackSlasher commented on GitHub (Jan 16, 2026):

@rekram1-node could we reopen? I think this is valuable for sandboxed instances (running the server in a docker container, and the client outside it)

@BackSlasher commented on GitHub (Jan 16, 2026): @rekram1-node could we reopen? I think this is valuable for sandboxed instances (running the server in a docker container, and the client outside it)
Author
Owner

@prashanthpai commented on GitHub (Jan 19, 2026):

@xadenryan Please reopen

@prashanthpai commented on GitHub (Jan 19, 2026): @xadenryan Please reopen
Author
Owner

@rakibdev commented on GitHub (Jan 19, 2026):

pls pls pls pls pls pls pls pls pls

@rakibdev commented on GitHub (Jan 19, 2026): pls pls pls pls pls pls pls pls pls
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1403