wait_for_result
Blocks until a task thread produces its stored result and returns that record, or null when the timeout lapses; use it to await results by thread_id.
Instructions
Block until the task named by thread_id produces its result (thread_result_set) and return the result record {thread_id, result, produced_by, produced_at}, or null when the timeout lapses; this is the wait in spawn, wait, aggregate. Unlike the event waits it returns the stored result rather than an event, and it needs a thread_id. A live wait does not see a result that already exists: read it with get_thread_result first, or use get_dependency_results for every dependency result of a parent at once. since_log_id replays a result set on this thread after that log_id before waiting live. To put a deadline on a thread instead, use set_wait. Requires workspace:read.
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": {
"thread_id": "<thread_id>"
},
"name": "wait_for_result"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| thread_id | Yes | UUID of the task thread whose result to await. You must be able to read it. | |
| timeout_ms | No | Wait window in milliseconds, from 1 to 300000 (default 30000). When it lapses the tool returns null. | |
| since_log_id | No | Your high-water log_id. The log is replayed for a matching event with a log_id greater than this before the wait goes live, so an event in the gap between two calls is caught. Omitted, only events after the call count. |