OpenCode Runs
opencode_runsStart, poll status, list recent, or cancel opencode agent runs. Launch fire-and-forget or blocking runs, then track or stop them via the CLI HTTP API.
Instructions
Manage opencode agent runs: start, poll status, list recent, or cancel.
Return Format
{"success": bool, "message": str, "data": dict} Fire-and-forget starts return a job_id; poll with action="status".
Examples
opencode_runs(action="start", prompt="Refactor main.py", wait=False) opencode_runs(action="status", job_id="abc123") opencode_runs(action="list", limit=20, offset=0)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | Block until done (start; default false = fire-and-forget) | |
| limit | No | Page size (list) | |
| action | Yes | start: launch an agent run. status: poll a run. list: recent runs. cancel: stop a run. | |
| job_id | No | Job ID (required for status/cancel) | |
| offset | No | Page offset (list) | |
| prompt | No | Agent prompt (required for start) | |
| project | No | Project directory (optional, start) | |
| timeout | No | Max seconds for the run (start) | |
| output_format | No | Output format (start) | text |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||