Autonomy at the Prompt Boundary
Munder Difflin's hive can place a message in a worker's inbox, but that does not mean the message is safe to type into a live terminal. This chapter follows the boundary between durable coordination and active input: how a worker is prepared, how a turn becomes idle, how the one-writer queue protects a person's prompt, and how operator controls respond when the process loops or spends too much. The practical judgment is simple but demanding: delayed work is often more reliable than an autonomous action taken at the wrong moment.
A durable message is not permission to type
A worker's lifecycle starts before the first task arrives. When Munder Difflin prepares an agent, it creates or refreshes a durable identity, memory, inbox, outbox, and processing cursor. It injects the hive protocol and the agent's role through the provider's supported startup path. A Claude-style provider can receive settings and lifecycle hooks directly; another provider may receive an initial prompt, a translated hook configuration, a plugin, or a proxy bridge. The result is a process that knows where its durable coordination state lives, but it is not yet an invitation for the harness to write at any arbitrary time.
The worker then enters a live provider turn. The event plane reports tool boundaries, notifications, status, and stop conditions; the terminal plane carries the actual interaction. A message from another worker can arrive in the inbox during that turn. It remains durable, visible to the router and later wakeup logic, but it should not be inserted into the provider's input line while the provider is using that line or while the human is answering a question there.
This distinction prevents two different kinds of state from being collapsed. The inbox answers, “What work has been addressed to this agent?” The terminal gate answers, “Can the next input safely be written and submitted now?” A worker may have unread mail and still be busy. It may be marked idle in a coarse roster while a picker is open or a person's draft is waiting for submission. Munder Difflin therefore treats message arrival as a condition for later delivery, not as delivery itself.
At a Stop event, the current path deliberately does not force unread hive mail into the terminal. Earlier designs could turn a Stop hook into an immediate continuation, but that bypassed the same draft and human-input protections needed elsewhere. The safer design leaves the message in place and lets a guarded idle-delivery path or the main-process wake watchdog re-engage the worker. A small delay is acceptable; a prompt silently merged with the wrong context is much harder to repair.
The one-writer queue protects the person at the keyboard
Several sources may want to send text to a worker: the operator's composer, Michael's dispatch, an inbox nudge, a scheduled maintenance action, Slack ingress, or a steer command. The message-queue contract gives them one route. They enqueue into the Munder Difflin queue, and one drain loop owns the decision to write into the PTY. This removes a dangerous race in which two automation paths each decide that the prompt is free and write on top of one another.
The drain waits for more than a nominal idle status.