Execute a coding task with OpenCode
opencode_executeDelegate repository coding tasks to OpenCode to automatically implement changes, run tests, and use Git. Get structured results with tool calls, diagnostics, and final diff.
Instructions
Delegate one repository coding task to OpenCode.
OpenCode runs non-interactively in the supplied directory, may read and modify files, execute terminal commands, run tests, and use Git. The result contains OpenCode's final text, observed tool calls, diagnostics, and the final Git working-tree diff. The Git diff is a post-run snapshot and can include changes that existed before this call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | Complete coding task and acceptance criteria for OpenCode. | |
| model | No | Optional OpenCode model in provider/model form; omit for its configured default. | |
| timeout | No | Maximum execution time in seconds (default 1800). | |
| reasoning_effort | No | Optional provider-specific reasoning effort passed to OpenCode as --variant, for example minimal, low, medium, high, or max. | |
| working_directory | Yes | Absolute path to the existing project directory OpenCode may modify. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| errors | Yes | ||
| stderr | Yes | ||
| stdout | Yes | ||
| success | Yes | ||
| summary | Yes | ||
| git_diff | Yes | ||
| exit_code | Yes | ||
| timed_out | Yes | ||
| git_status | Yes | ||
| session_id | Yes | ||
| git_diff_stat | Yes | ||
| elapsed_seconds | Yes | ||
| output_truncated | Yes | ||
| reasoning_effort | Yes | ||
| tool_invocations | Yes | ||
| working_directory | Yes | ||
| git_diff_truncated | Yes |