Skip to content

[FEATURE]: Support remote server connection in GitHub Action via --attach #15801

@dl-alexandre

Description

@dl-alexandre

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

The official anomalyco/opencode/github action is currently limited to standalone, ephemeral execution within the GitHub Actions runner. While this works for simple tasks, it lacks support for teams running persistent OpenCode servers that hold deep architectural context, warm caches, or specialized MCP tool configurations.

The OpenCode CLI already supports the --attach flag for remote execution, but this functionality is not yet exposed as a first-class citizen in the GitHub Action with: inputs.

Proposed Feature

Add support for connecting the GitHub Action to a remote OpenCode server. This would allow the Action to serve as a "remote trigger" that executes prompts on a more powerful or context-aware persistent instance.

Suggested Changes:

Update action.yml: Add optional inputs for remote connectivity:

inputs:
  server_url:
    description: 'URL of the remote OpenCode server (e.g., https://agent.acme.com:4096)'
    required: false
  server_password:
    description: 'Password for the remote server (should be passed via secrets)'
    required: false

Update index.ts Logic:

If server_url is provided, the action should skip local initialization.

Execute the command using the attach flag:
opencode run --attach ${{ inputs.server_url }} "${{ inputs.prompt }}"

Ensure OPENCODE_SERVER_PASSWORD is set in the environment if the password input is provided.

Use Cases:

Persistent Context

Running PR reviews on a server that "knows" the codebase long-term, rather than re-indexing in every ephemeral runner.

Hardware Offloading

Moving heavy computation/analysis from standard GitHub runners to high-performance private servers.

Unified Agent State

Ensuring that automated tasks (like TODO tracking) share the same session history as the human developers' interactive TUI sessions.

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions