Commercial CI/CD
OpenCode Agent Tasks guide
Use Agent Tasks as a CI/CD-native execution queue for autonomous code work without replacing existing issue trackers.
Not ticketing
Agent Tasks are execution records for autonomous code work. Jira, Linear, GitHub Issues, and GitLab Issues remain external sources of truth and can link into tasks.
Modes
PlanOnly and DraftPatch cannot report branch or PR completion. BranchCommit reports branch evidence. PullRequest must report a repository-owned PR URL and waits for approval before worker claim. Branch and PR modes require explicit validation commands.
Worker scope
Create human/API tokens with agent-tasks:read,agent-tasks:write. OpenCode workers require agent-tasks:worker for claim, renew, logs, validation, and completion; canary automation also needs agent-tasks:approve.
Evidence model
Task detail pages include attempts, worker logs, validation results, branch/commit/PR evidence, billing usage, support metrics, and audit events. The built-in Agent Task canary drives the control-plane lifecycle directly with caller-supplied PR evidence; it does not prove a hosted worker ran OpenCode, cloned, changed, validated, pushed, or opened a provider PR. Capture separate real-worker evidence.
Worker execution contract
Production claiming requires an OpenCode container image; host-command execution is development-only. OpenCode and validation run in the container, then a binary diff of at most 5 MiB is applied to a fresh host-side finalizer checkout before guarded commit/push. Successful branch work reports BranchPushed; missing required push or PR evidence reports Failed with available branch evidence. Claims renew before execution and every ten minutes; lease loss cancels active OpenCode/container work and blocks later finalization checkpoints.