opencode_start
Delegates an easy or medium task to an opencode agent asynchronously and returns a task id; refuses hard or unsure work and prompts with secrets, then enforces the routing mode.
Instructions
Delegate an EASY or MEDIUM job to an opencode agent (async; returns a task id). POLICY IS ENFORCED: tier is required and hard/unsure work is refused (it stays on Claude); the routing MODE (blueprint default | sensitive | insensitive; sensitive wins) is detected from env OPENCODE_MODE, /.claude/sensitive|insensitive, ~/.claude/insensitive, or the mode argument, and limits the agents (sensitive: explorer, librarian, deep-research, oracle, and fixer/worker only with mechanical:true). Blueprint mode: give fixer/designer a written Blueprint (files, signatures, edge cases, acceptance criteria, test command). Prompts containing secrets are refused. The session is titled "/: ". LIMITS: at most OPENCODE_BRIDGE_MAX_PARALLEL tasks at once (default 6), a per-task timeout, automatic retry (backoff) of transient provider errors for read-only agents only, prompts over ~100 KB are sent as an attached file. Verify the result yourself - it is an untrusted draft. Call opencode_policy for the full rules.
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": {
"prompt": "<prompt>",
"tier": "<tier>"
},
"name": "opencode_start"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Directory inside the allowed root | |
| lane | No | Lane / project short name for the session title (capitals), default = cwd name | |
| mode | No | blueprint | sensitive | insensitive - only when the user asked for a mode; sensitive always wins over other sources | |
| tier | Yes | easy | medium (delegable) | hard | unsure (refused: stays on Claude) | |
| agent | No | opencode agent: explorer | librarian | deep-research | oracle | fixer | designer | general | worker (default: explorer in sensitive mode, otherwise worker) | |
| model | No | provider/model[#variant]; default opencode's own default (set OPENCODE_BRIDGE_MODEL to change) | |
| title | No | Full session title; overrides the generated "<lane>/<agent>: <task>" (keep the convention) | |
| prompt | Yes | Full task: context, absolute paths, desired output, test command; the agent has no memory of this conversation | |
| session | No | Previous task id to continue its session | |
| mechanical | No | sensitive mode only: true = strictly mechanical boilerplate / text replacement | |
| timeout_minutes | No | wall-clock limit, default 120 (1-1440); the process group is killed when it is reached |