Expand description
send_message tool — bidirectional coordinator ↔ worker messaging.
§Design
Each worker spawned via spawn_worker (when operating in coordinator mode)
registers a WorkerMailbox in the global WorkerRegistry. The coordinator
can then call send_message to push follow-up instructions into a running
worker’s mailbox. The worker’s agent loop drains the mailbox between steps
and appends any pending messages as new user turns, allowing mid-run guidance
without restarting the worker.
§Current status
This file provides:
WorkerMailbox— a thread-safe FIFO queue of pending messages.WorkerRegistry— a shared map fromworker_id→WorkerMailbox.SendMessageTool— the LLM-callable tool that pushes messages.
The kernel integration (polling the mailbox between steps) is the next
phase; see .dev/goals/180-send-message-tool.md.
Structs§
- Send
Message Tool - The
send_messagetool — push a follow-up message to a running worker. - Worker
Mailbox - A FIFO queue of pending messages for a single worker agent.
- Worker
Registry - Global registry mapping
worker_id→WorkerMailbox.