From 2748ce2f4cabefa36b8737c2ac12f4040775cc80 Mon Sep 17 00:00:00 2001 From: iris Date: Sun, 5 Jul 2026 02:24:42 +0200 Subject: [PATCH] docs(turn-loop): document system inbox messages and link to approvals.md helper events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The messaging section listed the MCP tools for send/recv/ask/answer/ack_until but didn't mention the system events agents receive from sender 'system' — lifecycle events (spawned, rebuilt, killed, etc.) routed to the root agent and Q&A events (question_asked, question_answered) delivered to any agent. Add a brief paragraph that names the events and links to the canonical reference in docs/approvals.md where the full payload shapes and routing logic live. --- docs/turn-loop.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/turn-loop.md b/docs/turn-loop.md index 75cef004..0ba18914 100644 --- a/docs/turn-loop.md +++ b/docs/turn-loop.md @@ -571,6 +571,16 @@ ttl_seconds?, to?)`, `answer(id, answer)`, `ack_until(up_to)`. `ack_until(N)` to prevent re-pop. Acked rows never redeliver. Transient pings (sentinel id 0) have nothing to ack and show no marker. +**System messages** (from sender `system`): lifecycle and Q&A events +delivered as regular inbox messages (same `recv` path; body is a JSON +object with an `event` discriminant field). The root/manager agent +receives lifecycle events (`spawned`, `rebuilt`, `killed`, `destroyed`, +`container_crash`, `needs_login`, `logged_in`, `config_ready`, +`needs_update`, `approval_resolved`). Any agent receives Q&A events +when it is the declared target (`question_asked`) or the asker +(`question_answered`). Full payload shapes and routing logic in +[`docs/approvals.md` § Helper events](../approvals.md#helper-events-to-the-submitting-agent). + **Inbox** (`inbox` group): `get_loose_ends(agent?)`, `cancel_loose_end(kind, id)`, `remind(message, delay_seconds? | at_unix_timestamp?)`, `request_next_turn()`.