opencode_execute
Execute bounded coding tasks via OpenCode v2 and receive a compact JSON report with diff, test context, exit code, and session ID.
Instructions
Execute one bounded coding task through OpenCode v2 and return a compact JSON report with diff/test context.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | Absolute working directory/repository root. | |
| task | Yes | Bounded coding task with goal, constraints, files, acceptance criteria, and verification command. | |
| agent | No | OpenCode v2 agent name, e.g. claude-worker or build. | claude-worker |
| model | No | Optional OpenCode provider/model, e.g. openai/gpt-5.5. | |
| sessionId | No | Continue a specific OpenCode session instead of starting a new one. | |
| timeoutMs | No | Internal OpenCode timeout; must be below Claude MCP per-server timeout. | |
| standalone | No | Use OpenCode private standalone server for this run. Default false uses normal v2 service behavior. | |
| continueSession | No | Continue last OpenCode session; ignored when sessionId is set. |