wait_run
Block until a background run finishes. Pass a task ID, list of IDs to wait for the first to complete, or omit to wait for any currently live run. Returns the winning run's result or a timeout status with pending tasks.
Instructions
Call after start_run to block until a background run finishes. Pass task_id for one run, task_ids=[...] to wait for whichever of several finishes FIRST, or omit both to wait on every currently-live run for the repo. On completion returns the winning run's final ToolResponse (pending_task_ids lists any still-running siblings); on timeout returns a RUNNING lookup whose summary says to keep calling wait_run with pending_task_ids until one finishes. Background tasks are shielded from waiter cancellation, so re-calling never loses work. Default 540s (9 min); clamped to [1, 100_000s / ~27.8h], matching Claude Code's MCP_TOOL_TIMEOUT default. Pick timeout_seconds below your own MCP client's tools/call ceiling — Claude Code defaults to ~28h (the full clamp is usable); Codex CLI defaults to 60s per [mcp_servers.].tool_timeout_sec (raise that first); Claude Desktop / Cursor / Cline / Continue vary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | No | ||
| task_ids | No | ||
| repo_root | Yes | Absolute path to the target git worktree. Always pass the caller's active repository root; Dobby deliberately has no implicit repo fallback. | |
| timeout_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool | No | ||
| state | Yes | ||
| result | No | ||
| status | No | ||
| summary | Yes | ||
| task_id | Yes | ||
| warnings | No | ||
| repo_root | Yes | ||
| stop_reason | No | ||
| result_state | No | ||
| artifact_paths | No | ||
| pending_task_ids | No |