pmux_agent_capture
Recover a v2.1 agent response by reading report files with a requestId, or fall back to pane capture. Returns structured status to indicate if the next turn can be sent.
Instructions
Primary agent orchestration tool: recover a v2.1 agent response. Use pmux_capture_pane only as a low-level fallback. If requestId is supplied, first read the report file at workspaceDir/.pmux-agents//turn-.md and require matching status line plus EOF marker. Without requestId, file recovery is skipped and pane BEGIN/END fallback is used. Returns structured complete/blocked/working/inconsistent/partial/missing results; partial/working means do not send the next turn yet.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| turn | Yes | Caller-owned turn number. turn=0 is recommended for bootstrap. | |
| tabId | Yes | Target tab id (from pmux_list_tabs / pmux_create_tab). | |
| agentId | Yes | Caller-owned agent id: ^[a-z0-9][a-z0-9_-]{0,31}$. | |
| requestId | No | Optional caller-owned request id using the same format as agentId. | |
| workspaceId | Yes | Target workspace id (from pmux_list_workspaces). |