diff --git a/prompts/tools-subagent.md b/prompts/tools-subagent.md index 1784ef8..d4e6265 100644 --- a/prompts/tools-subagent.md +++ b/prompts/tools-subagent.md @@ -83,7 +83,9 @@ Remaining args: the task prompt (immediate task only — coordination lives in t ## Returning results to the parent -Subagents signal completion by writing directly to `s/{parent_session_id}/prompt`. This wakes the parent's idle session and delivers the result as its next turn input — no polling required. +Subagents signal completion by writing directly to `s/{parent_session_id}/prompt`. This delivers the result as the parent's next queued turn — no polling, no blocking, no active waiting. + +**Critical**: The parent must NEVER actively wait for subagent results. No `statewait`, no polling loops, no blocking reads. After spawning, the parent either continues its own work or ends its turn. When a child writes to the parent's prompt, the message queues and drains automatically when the parent next idles. This avoids wasting expensive coordinator tokens on idle waiting and eliminates coordination deadlocks. The result written to the parent's prompt should be compact and unambiguous. Use this format: