pane_wait
Wait for a pane to become idle or match a regex, then return state and recent lines to decide if the agent finished or needs input.
Instructions
Wait until a pane stops changing for idle_seconds, or pattern (regex) appears.
Returns state (idle | matched | timeout) plus the last tail_lines lines so
you can decide whether the agent finished, is asking a question, or errored.
Keep timeout_seconds under your client's tool timeout; call again to keep waiting.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pane | Yes | ||
| pattern | No | ||
| tail_lines | No | ||
| idle_seconds | No | ||
| timeout_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |