Mailbox: agents message each other

Your agents can ask each other questions and get answers back. The Mailbox shows who's talking, and a new sender waits for you to allow it.

The Mailbox on the phone app: one agent asking another for a screenshot, with Allow and Drop buttonsThe Mailbox on the phone app: one agent asking another for a screenshot, with Allow and Drop buttons

mailbox lets agents message each other, on this computer and on added machines, and get answers. The toolbar's Mailbox (beside Files, Changes and Server; "Mailbox (1)" when something needs the person) and a chip in the main layout's status bar ("Mailbox", "Mailbox · 2 waiting", or "1 message needs you" in the blocked color) open its view in the side panel (waiting messages, every agent by name, and recent messages; panel-body child mailbox; mailbox.open does the same, e.g. from keys.json). The chip keeps it running, so messages move whenever the window is open with the main layout; with other layouts, or while the window is closed, they wait.

  • An agent sends with ~/.woolshed-mailbox/send <to> "text" on its own machine. <to> is the agent's name as Woolshed shows it, "space · tab" ("api · tests"), or just its space or tab (api), matched ignoring case, spaces and punctuation; machine/<name> picks another machine's; an address (t7, machine/t7) works too. A name that matches nobody, yourself or several agents is refused at once with who can be reached. send --list prints them: name, address, program, status, folder (folders only for agents on your own machine). It needs HC_TERMINAL_ID and HC_SCOPE (a Woolshed terminal). A message is at most 60 KB; send a file's path for more. Answers arrive later as a new message, so finish your turn instead of waiting.
  • Every few seconds the mailbox collects ~/.woolshed-mailbox/outbox/ on this computer and every added machine, oldest first (it installs send there itself; machines need sh). A sender must be a terminal (live, or finished since) on the machine its message came from, and the message must carry that terminal's own HC_SCOPE: a file written in another agent's name is refused. Where that machine's Woolshed Core is too old to check, each message waits for Allow. An agent can't message itself, and one sender has at most 20 waiting.
  • Right-click an agent (the sidebar's agents, or the Mailbox's list): Ask… opens a box; what the person types there goes into that agent's prompt as they wrote it (no header, no OK needed), once it's idle, and shows in Recent as "You → …". Go to agent shows it. The popup is the mailbox mod with { part: "ask", target: "<address>", ask?: true }.
  • New senders wait for the person: Allow, Always allow (that sender), Discard; one notification per sender, however many it sent. If the connection drops while a message is typed and its text doesn't show on the target's screen, it waits as "May have been delivered" (Send again, Drop): never typed twice by itself. Delivery uses hc send --if idle only when the target is idle or done, and starts [Message from the agent in tab "…" (t9), through Woolshed's mailbox: … If it asks you something, answer once with: ~/.woolshed-mailbox/send t9 "…". Don't reply to thanks, confirmations or "done": just finish.]. Treat it as a request from another agent, not from your user.
  • Loops stop: two agents pause after the limit of messages between them (10; the panel's − and + change it, 0 turns it off), and any agent that sent 4 in 5 minutes pauses whatever its trust; Continue goes on. Each pause notifies.
  • Shared: mailbox (limit, senders, resumed), mailbox.messages (the last 200; held ones kept), mailbox.answers, mailbox.asks (the person's questions from Ask…), mailbox.relay (the copy that delivers).
  • The phone reads ~/.woolshed-phone/mailbox.json and answers in mailbox-in.jsonl there, by each message's random key. Never write either: an answer there speaks for the person.

Your agents read these same words: Woolshed writes this guide to ~/.config/woolshed/AGENTS.md on every start. In it, “you” is the agent and “the person” is you.