Skip to content

Conversation

@prashanthpai
Copy link

@prashanthpai prashanthpai commented Jan 20, 2026

Unix domain socket support is particularly useful in sandboxed environments where we may not want to expose ports.

  • adds --unix option to server
  • adds support to pass socket file path to opencode attach on the client

Example:

Server:

$ ./packages/opencode/dist/opencode-darwin-arm64/bin/opencode serve --unix /tmp/opencode.sock

Client:

$ ./packages/opencode/dist/opencode-darwin-arm64/bin/opencode attach unix:///tmp/opencode.sock

Monitor usage:

$ watch lsof /tmp/opencode.sock

Closes: #2119
Similar PR: #2120

Signed-off-by: Prashanth Pai <411294+prashanthpai@users.noreply.github.com>
@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found:

This PR appears to be directly related to the current PR #9668 as it also addresses unix domain socket support for the server. Both PRs are implementing similar functionality for handling socket-based connections rather than port-based ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bind to Unix domain socket with a file descriptor

1 participant