opencode_run
Send a task to OpenCode and await the outcome. Get a durable job ID; if observation times out, the job continues and can be resumed.
Instructions
Send a task and wait for its correlated response. Returns a durable job ID; an observation timeout leaves the remote job running and can be resumed with opencode_wait.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent | No | OpenCode agent name | |
| title | No | Title for a new session | |
| format | No | Response format: plain text or JSON constrained by a JSON Schema. JSON Schema requires OpenCode permission for the StructuredOutput tool. | |
| prompt | Yes | Task or instruction to send to OpenCode | |
| modelID | No | Model ID from provider discovery | |
| variant | No | Model variant | |
| directory | No | Absolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory. | |
| sessionId | No | Existing session to continue; omit to create one | |
| providerID | No | Provider ID from provider discovery | |
| maxDurationSeconds | No | Maximum observation duration in seconds (default 600); timeout does not abort the job |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| error | No | ||
| jobId | No | ||
| result | No | ||
| status | Yes | ||
| isError | Yes | ||
| directory | No | ||
| messageId | No | ||
| sessionId | No |