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
General opencode-action behavior currently depends on opencode github run, which owns both GitHub orchestration and model execution. It handles event parsing, reactions and progress comments, issue and pull-request context, local and fork branch checkout, commits, pushes, pull-request creation, attachments, session sharing, and token cleanup.
OpenCode v2 does not currently expose a compatible github run command. Calling opencode2 run directly can execute an agent, but it cannot preserve the action's full issue-to-PR and PR-update behavior by itself.
Continuing to depend on the upstream GitHub handler also couples the action to OpenCode internal behavior and prevents the same orchestration from supporting multiple runtime generations.
Goal
Own the GitHub event lifecycle in opencode-action and expose OpenCode v1 and v2 through narrow runtime adapters.
Proposed architecture
GitHub event
-> action-owned GitHub runner
-> normalized task and repository context
-> OpenCode runtime adapter
- v1 adapter
- v2 adapter
-> normalized result and worktree state
-> GitHub comment, review, commit, push, or PR mutation
Proposed changes
Implement an action-owned runner for the currently supported GitHub event types.
Separate GitHub API and git mutations from LLM execution.
Define a minimal runtime adapter contract for:
executable and installation strategy;
model, variant, agent, prompt, and configuration inputs;
noninteractive execution;
structured output or final response capture;
timeout and failure reporting.
Port the existing behavior for:
issue comments and PR review comments;
issues, pull requests, workflow dispatch, and schedule events;
local and fork pull requests;
branch creation, commit, push, and pull-request creation;
Keep /review-pr on its stricter review-only path rather than routing structured review submission through the general mutation runner.
Add contract tests that run identical event fixtures against v1 and v2 adapters.
Define a compatibility matrix for runtime-specific features that cannot be implemented identically.
Acceptance criteria
GitHub event routing and mutations no longer require opencode github run.
The v1 adapter preserves existing observable behavior.
A v2 adapter can support issue explanation, issue fixes, PR changes, and scheduled or dispatched tasks without importing OpenCode internal source modules.
Local and fork PR workflows have integration coverage.
Authentication, cleanup, timeout, and error behavior are deterministic across runtimes.
Runtime-specific limitations are explicit and fail clearly rather than silently degrading.
Problem
General
opencode-actionbehavior currently depends onopencode github run, which owns both GitHub orchestration and model execution. It handles event parsing, reactions and progress comments, issue and pull-request context, local and fork branch checkout, commits, pushes, pull-request creation, attachments, session sharing, and token cleanup.OpenCode v2 does not currently expose a compatible
github runcommand. Callingopencode2 rundirectly can execute an agent, but it cannot preserve the action's full issue-to-PR and PR-update behavior by itself.Continuing to depend on the upstream GitHub handler also couples the action to OpenCode internal behavior and prevents the same orchestration from supporting multiple runtime generations.
Goal
Own the GitHub event lifecycle in
opencode-actionand expose OpenCode v1 and v2 through narrow runtime adapters.Proposed architecture
Proposed changes
opencode github run#57./review-pron its stricter review-only path rather than routing structured review submission through the general mutation runner.Acceptance criteria
opencode github run.