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

Merge pull request #563 from TTAWDTT/fix/bug-2-hive-routing

Chaitanya Giria6bc3b849d72
diff --cc src/main/hive.ts
index e79605ff,825f2825..5f9c38bf
--- a/src/main/hive.ts
+++ b/src/main/hive.ts
@@@ -1684,46 -1602,9 +1701,42 @@@ export class HiveManager
// 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);
+ this.bounceToGod(msg, godId, `[bounced — "${t}" is the send-only prep assistant; route work to a real agent] ${msg.subject}`);
continue;
}
+ // An ARCHIVED recipient (its terminal is gone) still has an inbox, so the
+ // mail lands there and reads as delivered — and stays unread. Filing it
+ // is right: a worker re-hired under the same id reads it on its first turn
+ // (a released worker's inbox is settled only up to its done signal). But
+ // the sender learned nothing, so god kept mailing dead agents for hours
+ // (seen live 2026-08-16), and a request to a worker nobody re-hires was
+ // simply lost. Now mail that expects an answer is filed AND its sender is
+ // told, at once, that no one is there to answer it. Inform-only mail
+ // (status, done, agree) is filed quietly. This comes BEFORE the provider
+ // branches below on purpose: with no terminal there is nothing to hand a
+ // work order to, whatever the engine — the inbox is the only place left.
+ // The notice itself is ROUTED, not dropped into an inbox, so a sender on
+ // a hookless or proxy-tier engine gets it the way it gets any mail.
+ if (t !== godId && reg.agents[t]?.archived) {
+ if (this.deliver(msg, t)) delivered.push(t);
+ this.appendLog({ kind: 'archived-recipient', from: msg.from, to: t, id: msg.id, act: msg.act });
+ const sender = reg.agents[msg.from];
+ if (msg.requires_reply && sender && !sender.archived) {
+ this.routeMessage(this.normalize({
+ to: msg.from,
+ act: 'inform',
+ in_reply_to: msg.id,
+ conversation: msg.conversation,
+ hops: msg.hops + 1,
+ requires_reply: false,
+ subject: `[no one is there to answer — "${t}" is archived] ${msg.subject}`,
+ body: `Your ${msg.act} to ${t} was filed in its inbox, but ${t} has no live terminal (archived), `
+ + `so it will only be read if ${t} is restored or re-hired under the same id. `
+ + 'If you need this done now, route it to an agent on the live roster or hire one.'
+ }, 'system'));
+ }
+ continue;
+ }
// A provider without safe-idle lifecycle state (a hookless custom command)
// would let direct mail rot unread. Claude and bridged Antigravity/Codex
// receive directly into inbox/ for guarded renderer delivery. Otherwise try