opencode_start
Starts an OpenCode task in the background and returns a job ID so you can poll status instead of blocking; avoid launching a duplicate task while the job is running.
Instructions
Start an OpenCode task in the background and immediately return a job ID. Poll opencode_status; do not start a duplicate task while the job is running.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"task": "<task>",
"cwd": "<cwd>",
"model": "<model>"
},
"name": "opencode_start"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | Existing absolute project directory. | |
| task | Yes | Task, scope and expected output. Start with ordinary text, not a CLI option. | |
| agent | No | Optional OpenCode agent in write mode. Read-only mode always uses an isolated reader agent. | |
| model | Yes | REQUIRED for each delegation: configured provider/model, optionally #variant. Use an explicitly authorized ID; ask or call opencode_models if unspecified. No automatic model selection or fallback. | |
| readOnly | No | Allow file reading/search only. Denies edit, shell, external directories and network tools. | |
| sessionId | No | Unsupported: omit this field. Old sessions can override the selected project and current permissions. | |
| timeoutMs | No | OpenCode process timeout, independent of the MCP request timeout. | |
| standalone | No | Start a private OpenCode server. Required in read-only mode. | |
| autoApprove | No | Approve tools that are not explicitly denied. Enable only for tasks whose tool actions are authorized. | |
| continueSession | No | Must remain false. This bridge creates a new session for each task. |