Fetch opencode task result
opencode_resultRetrieve the final assistant message and metadata (tokens, cost, session id) for a completed opencode task after all tool calls finish.
Instructions
Return the final assistant message and metadata (tokens, cost, session id) for a finished task, parsed from opencode's own --format json event stream. message is only the model's last turn (after all tool calls finish); narration includes intermediate step narration too, in order. Errors politely if the task is still 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_id": "<task_id>"
},
"name": "opencode_result"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | Task id returned by opencode_dispatch. |