Skip to content

an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions

fix: enforce the assistant send-only contract at the router (bounce to god)

Gulum808c3ad62678
diff --git a/src/main/hive.ts b/src/main/hive.ts
index 0cc287e8..ffa3379a 100644
--- a/src/main/hive.ts
+++ b/src/main/hive.ts
@@ -527,7 +527,24 @@ export class HiveManager {
? Object.keys(reg.agents).filter((a) => a !== msg.from && !reg.agents[a]?.isAssistant && !reg.agents[a]?.archived)
// Never deliver to self — guards a god → "human" message looping back to god.
: [resolveTo(msg.to)].filter((t) => t !== msg.from);
- for (const t of targets) this.deliver(msg, t);
+ for (const t of targets) {
+ // Enforce the assistant's send-only contract AT THE ROUTER: it has no
+ // composer, is excluded from the inbox-wake nudge, and never reads an
+ // inbox — yet direct mail used to be delivered there anyway, where it
+ // rotted unread (observed live: a task brief plus the follow-up
+ // reprimand about the unread inbox, both unread for hours). Bounce such
+ // mail to god instead, so the sender's intent surfaces immediately and
+ // nothing is silently lost.
+ if (reg.agents[t]?.isAssistant) {
+ this.deliver({
+ ...msg,
+ to: godId,
+ subject: `[bounced — "${t}" is the send-only prep assistant; route work to a real agent] ${msg.subject}`
+ }, godId);
+ continue;
+ }
+ this.deliver(msg, t);
+ }
this.appendLog({ kind: 'message', from: msg.from, to: msg.to, act: msg.act, subject: msg.subject, id: msg.id });
this.emitMessage(msg, targets);
}