Uh oh!
There was an error while loading. Please reload this page.
feat(github-action): Support remote server connection via --attach - #15866
feat(github-action): Support remote server connection via --attach#15866dl-alexandre wants to merge 3 commits into
Conversation
Add support for connecting the GitHub Action to a remote OpenCode server, enabling execution on persistent servers with deep context and warm caches. Changes: - Add server_url input for remote server URL (e.g., https://agent.acme.com:4096) - Add server_password input for authentication (via GitHub secrets) - Modify createOpencode() to conditionally connect to remote server - Add validation ensuring password is paired with URL - Handle cleanup: skip kill() for remote servers Closesanomalyco#15801
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
rekram1-node
commented
May 15, 2026
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes#15801
Type of change
What does this PR do?
Adds support for connecting the GitHub Action to a remote OpenCode server via the
--attachfunctionality. This enables the Action to serve as a "remote trigger" that executes prompts on persistent servers holding deep architectural context, warm caches, or specialized MCP tool configurations.Changes made:
action.yml: Added two new optional inputs:
server_url: URL of the remote OpenCode server (e.g., https://agent.acme.com:4096)server_password: Password for authentication (should be passed via GitHub secrets)index.ts: Modified
createOpencode()function to:server_urlis provided and connect to remote server via SDKAuthorization: Bearer <password>header whenserver_passwordis providedserver_passwordcannot be used withoutserver_urlclose()function for remote servers (skip process kill)server_urlprovidedWhy these changes work:
The OpenCode CLI already supports
--attachflag for remote execution. This PR exposes that functionality in the GitHub Action by conditionally creating an SDK client connected to the remote URL instead of spawning a localopencode serveprocess. The implementation uses the existing SDK'screateOpencodeClient()with custom headers for authentication.Use cases enabled:
How did you verify your code works?
server_urlprovided: connects to remote with optional authChecklist