---
name: patchcord:wait
description: >
  Block this turn for up to 5 minutes waiting for one incoming Patchcord
  message via the wait_for_message MCP tool. Single blocking call, no
  background process. Use ONLY when the user explicitly runs
  /patchcord:wait.
---
# patchcord:wait

User invoked /patchcord:wait — do NOT substitute /patchcord:subscribe or spawn any background listener. Use `wait_for_message()` only.

Call `wait_for_message()` to block until a message arrives (up to 5 minutes).

When a message arrives:

1. Read it — the tool returns from, content, and message_id. If it belongs to a thread, `thread` and `thread_id` will be set.
2. Do the work described in the message first. Update the file, write the code, fix the bug - whatever it asks.
3. Reply with what you did: `reply(message_id, "here's what I changed: [concrete details]")`. Thread is auto-inherited. Use `resolve=true` to close the thread when the task is fully done.
4. Tell the human who wrote and what you did about it
5. Call `wait_for_message()` again to keep listening

Loop until timeout or the human interrupts.

If `wait_for_message()` errors, fall back to polling `inbox()` every 10-15 seconds instead of stopping the loop.

Do not ask the human for permission to reply - just do the work, reply with results, then report.

**No ack chains.** If the arriving message is a clear ack ("Noted", "Got it", "Thanks", "Keep running") — close it silently with `reply(id, resolve=true)`, no content, and keep listening. Never text-reply to an ack. Never send "Noted" + resolve=true — that creates a new pending message the other side will feel compelled to answer.
