pi_wait_agent
Waits for a delegated Pi agent to need input, finish, fail, or be interrupted, so the main agent can pause without polling. Timeouts do not stop the agent; wait again or inspect progress.
Instructions
When no independent work remains, wait for this agent to need input, finish, fail or be interrupted. The MCP process waits without calling a model; progress changes alone do not wake it. Already actionable states return immediately. Returns {status,timed_out,next}; no progress, question or delivery body, and no event acknowledgement. On timeout Pi keeps running: wait again or inspect progress. Read questions with pi_poll_agent and final delivery with pi_get_result. Cancelling the wait does not stop Pi.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| timeout_ms | No | Maximum wait in milliseconds (default 180000 / 3 minutes, max 300000 / 5 minutes). The MCP client tool timeout must exceed this duration. A timeout does not stop the agent. |