delegate_local
Delegate bounded coding, testing, explanation, or review work to a local OpenCode agent, with explicit model selection, async polling, and capped previews plus output artifacts.
Instructions
Delegate a bounded coding, test, explanation, or review task through OpenCode. Select model_id explicitly for a free or alternate provider; otherwise use its configured model. Provider locality and billing vary. Returns a capped preview plus output artifact and supports async polling. No automatic model fallback.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "delegate_local"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Preset agent mode: 'review' maps to read-only OpenCode reviewer (edit denied); 'code'/'test'/'docstring' to build; 'explain'/'plan' to plan | default |
| files | No | Optional file paths for the local agent to inspect with its own tools | |
| job_id | No | Poll status or retrieve results for a previously launched async job | |
| prompt | No | Instruction or prompt for local execution | |
| workdir | No | Target project directory for OpenCode execution (defaults to current working directory) | |
| model_id | No | Optional OpenCode model override (e.g. 'strata/qwen3.8-flash-next-iq3_s') | |
| free_only | No | True forces the free allowlist. When omitted, defaults to free-only unless the user explicitly saved this selected model with allow_paid=true. No automatic model fallback. | |
| async_mode | No | If true, launches OpenCode in background and returns job_id immediately without blocking | |
| output_path | No | Optional target file path. If set, code is written directly to disk and only a short preview is returned. | |
| skip_if_busy | No | If true, returns immediately when OpenCode worker slot 0 is busy instead of waiting in queue. | |
| require_local | No | Force verified local inference independently of content patterns; never replace the configured local model with the hosted free default. | |
| verify_command | No | Optional shell verification command (e.g. 'pytest -q tests/test_x.py') to run after writing `output_path`. |