The agent is the bridge: one agent acting across Slack and Buzz
Context
The team's humans live in Slack. The team's agents live on a Buzz (Nostr) relay, where they are mentionable, cryptographically identified, and talk to each other. The ask: let a person in Slack make the same agent act on Buzz (post, wake a sibling, bring something back) and the reverse — and decide whether that is worth building.
The toolkit's founding property answers half of it already: one process, one identity, one memory, N surfaces. A surface is a door, not a place. The agent answering in Slack is the agent on Buzz; there is no second copy to keep in sync. So the question is not "how do two agents talk" but "which cross-door verbs are missing, and which of them the design doctrine permits." There are three verbs: post, wake, return.
What already works (verified in code — nothing to build)
| A person in Slack says… | What happens today | Where |
|---|---|---|
@harry post "deploy done" to Buzz channel hive | Top-level post on Buzz through the gateway-hosted post_message tool; same channel guards as a reply; confirmation back in the Slack thread. Reverse direction identical. Enabled by default when a second surface is added. | packages/core/src/surface-egress.ts:280, guide ch. 2 "Let one surface post to another" |
@harry run fleet-roll-call | job_run starts a declared on-request job. A probe job body posts on Buzz with mentions, waits, reads the thread back, mints a verdict. If the job fits inside turnTimeoutMs the verdict is returned into the Slack thread. | packages/core/src/job-server.ts:318, job-channel.ts, docs/job-contract.md:170 |
| anything, on either door | Same persona; same vault / private / team memory. | turn.ts, brain-acp.ts |
Post exists. Wake and return are the gaps.
What is missing
Wake — a brain post cannot wake anyone. The brain's post_message has no mentions
(deliberately: CHANGELOG 0.2.0 "the brain's post_message has no such field"). On Buzz the p
tag is the only wake trigger, so a Slack-initiated "tell ida X" is a note in a channel ida
never reads. On Slack, <@U…> typed by the brain is escaped to text, so an agent on Buzz
cannot page a human in Slack either. The adapters already render mentions
(buzz.ts:209, slack.ts:323); only the probe job channel may pass them.
Return — nothing comes back to the conversation that asked. A job longer than a turn
posts its verdict top-level to its one report channel; the Slack thread that asked gets
"it's running." The gateway holds the origin event during the turn
(SurfaceEgress.answering) and drops it when the turn closes.
Two facts that shape the design. Slack can tell another bot apart (isAgent on any
bot_id); Buzz flags only the agent's own key (adapter-buzz/src/normalize.ts:83), so the
agent-chain depth cap does not bite on Buzz — siblings look like humans, and every toolkit
reply p-tags its parent's author. And there is no outbound rate limit: TurnPolicy is
inbound admission only (gateway.ts:249). Anything that lets a post wake people amplifies
both.
What stays refused, and why
- Thread mirroring / a Slack↔Buzz bridge. Spec §8: handoffs are one-way, fire-and-forget;
fleets-and-the-mayor.md: "coordination through a public channel means every hand-off is a message a human scrolls past." A mirror is an injection relay from an open relay into a private workspace, and the guard is not source-aware (only destination consent + leak scan). - A brain-held
thread_read. The probe is deterministic code because "an LLM composed the tally wrong." Reads stay in job bodies. - Origin annotation (gateway remembers "posted on Buzz on behalf of Slack thread T" and tells the brain when a reply lands). It is a two-way handoff with a trusted-looking label on brain-initiated, untrusted-text-driven action. Vault "write on the way out" steering already covers the honest version. Defer.
allowlistas paging authority. The allowlist says who may wake me; it is inbound consent, not permission to page (job-server.ts:111draws this line). A fleet's allowlist names siblings, so it would make the first brain-initiated sibling wake driven by channel text.
Recommendation
First, the operating model (config, not code)
Model A — every fleet agent gets a Slack door. surface slack + identity register slack
per agent. Humans @mention the real agent; post_message bridges to Buzz on request. This is
what the toolkit is built for. Cost: one Slack app per agent — a bot identity is an app,
two agents cannot share one. Fine up to a handful of agents.
Model B — one Slack-facing front door (the mayor) that reaches siblings on Buzz. For when a Slack app per agent is not acceptable. Needs the three items below.
Then, in this order, each its own PR
1. Now, zero toolkit change: a fleet-owned "page" job. An on-request job with
report: {surface: buzz, channel: hive, probe: true} and typed
parameters: {to: {type: string, values: [<sibling npubs>]}, text: {type: string, pattern: …}}.
The body posts into hive with mentions: [JOB_PARAM_TO] — the sibling wakes — waits its
budget, reads the thread back, and tallies acked within budget: yes/no as a gate. Set
wallClockMs + deadlineHeadroomMs under turnTimeoutMs (default 120s; headroom default is
300s, so the default is detached) and the tally comes back in the Slack thread. This is
the doctrine's own shape: an explicit reviewed roster, deterministic code, one post per run.
What it does not do: bring the sibling's words back (reply text is untrusted and must not be
spliced into the verdict), reach a Slack DM, or run two pages of one slug at once.
2. Toolkit: a detached job answers where it was asked. Keep the origin InboundEvent in
the job server's closure (not in JobHost, which must not know what a surface is); when the
run settles, reply into that event through the existing guarded reply path in addition to —
or instead of, per report.announce — the report post. This is the return primitive and
what makes a long Buzz-side job usable from Slack. Issue first (guarded egress).
3. Toolkit: one owner-only mention on the brain's post_message. A singular mention
field, accepted only if the id is in manifest.owner (defined as "one id per surface for the
same person" — exactly the cross-door case), at most one page per live turn. This is how an
agent on Buzz pages its human in Slack, and how a human in Slack has it page them on Buzz.
Sibling paging stays with item 1. Issue first.
Is it useful?
Yes, for three things the team will actually do: run Buzz-side work from Slack and get the answer in the thread (1 + 2); have an agent reach its owner across doors (3); announce either way (exists). Not useful, and refused: making Slack and Buzz one conversation.
Decisions needed from you
- Do the fleet agents run Buzz-only today, and is one Slack app per agent acceptable (Model A), or do you need a single front door (Model B)?
- Which loop matters most: wake a sibling from Slack · bring a long job's result back to the Slack thread · let an agent page its owner across doors?
- For waking siblings: is a deterministic page job (item 1) acceptable, or do you want the brain to address siblings directly? (The latter is the allowlist design refused above; it can be revisited with a stated residual.)
Implementation notes
<details> <summary>Files, shapes, tests — for the implementing agent</summary>Item 1 — fleet bundle only. Lives in the fleet's agent directory, not this repo:
agent.yaml job declaration (trigger: {onRequest: true}, report.probe: true, parameters
per manifest.ts:652-700, MAX_PARAM_LENGTH 1024), a body script using the
JOB_CHANNEL_URL recipe from docs/job-contract.md:195-223, and
sageox-agent mcp add jobs. Worth a docs example in docs/guide/chat-surfaces.md under a new
"Reach the fleet from Slack" section naming Model A, Model B, and the refusals above.
Item 2 — detached job replies where asked.
packages/core/src/surface-egress.ts: addansweringEvent(): InboundEvent | null(one-live-turn rule, asreact/askingat:175-203);asking()becomesansweringEvent()?.author ?? null. AddreplyTo(event, msg)that picks the adapter fromevent.surfaceand delegates toreply(:260-269).packages/core/src/job-server.ts:JobToolOptions.asking→answering; addreply?: (event, text) => Promise<void>. In the detached branch (:318-320) captureorigin = answering?.()beforeawait host.startRequest, pass anonSettledcallback.describeStart(:356-371) promises a reply-back only whenreplyis wired.packages/core/src/job-host.ts:startRequest(:464) takesonSettled?: (run) => Promise<void>, threaded throughbegininto theowedclosure andfinish, invoked insidesettle(:579-587) afterannounce, soabandon()waits for it andgiveUp(:590) tells the asker the host stopped. Best-effort, own try/catch, onejob_reply … result=lostline. Flip theannounces()premise (:1166-1170): passdetached && !repliedso a replied run announces perreport.announcelike a waited-for one.packages/cli/src/cli.ts:364-373,:1484-1495: wireansweringandreply: (event, text) => egress.replyTo(event, {text})besidejobPoster/jobReader.- Adapters need no change:
BuzzAdapter.sendneeds only relay + explicit context (buzz.ts:188);SlackAdapter.sendreadstsoff the event id (slack.ts:293); a DM whose adapter reconnected mid-run failsassertChannel→ caught → report fallback. - Tests:
job-server.test.ts— detached run with a live event callsreplywith that event and the run id; two live turns → no reply anddescribeStartpromises none.job-host.test.ts—abandon()resolves only afteronSettled; a replied run announces per mode, not as detached. - Docs:
docs/guide/reference.md:84-89,docs/job-contract.md. CHANGELOG[Unreleased].
Item 3 — owner-only mention.
packages/core/src/surface-egress.ts:PostArgs(:381) gainsmention: z.string().min(1).optional()(singular: a field that can hold one is typed as one). In the handler'sPOST_MESSAGEbranch (:479-484), require exactly one live turn, refuse if that turn already paged, checkmanifest.owner.includes(mention)(owner ids are already normalized incli.ts:234-235), thenegress.post(…, undefined, [mention]).SurfaceEgress.postand the adapters are unchanged. Declarementionon the audit line (:469) — it is a manifest id, never channel text. Tool description: pass the id exactly as it appears in the prompt header'sfrom ….packages/core/src/turn.tsPOST_MECHANICS(:42): one sentence — a mention wakes that person and is only for when they asked to be reached.- Termination proof for the PR: one admitted inbound turn → at most one outbound page; bounded by inbound
TurnPolicywith no new counter. Residuals to state verbatim: Buzz cannot flag siblings (normalize.ts:83-93) somaxAgentChainDepthdoes not bite there and a Buzz agent-to-agent exchange is stopped only bymaxTurnsPerThread/per-minute caps; no egress rate cap exists for unpaged posts; a Slack owner is woken by an agent that read untrusted text. - Tests (
surface-egress.test.ts, existingadapter()fixture recordsmentions): owner id → posted with[id]; non-owner → throws, nothing posted; second page in one turn → refused; no live turn → refused; display name → adapter refuses. - Update the CHANGELOG 0.2.0 sentence that says the brain's tool has no such field is now historical; add
[Unreleased]entry. Note the residual in design spec §8/§16.
Process. ox plan enrich flags chat-surfaces.md, slack.ts, surface-egress.ts, job-host.ts, job-server.ts, gateway.ts as contended by other active workspaces — rebase before each PR. Guarded-egress changes: open an issue first (CONTRIBUTING.md). One change per PR with a test that fails without it.
Verification
pnpm typecheck && pnpm testgreen after each PR.- Item 1: from Slack,
@harry page ida "are you up?"; audit showspost_message surface=buzz channel=<hive> mentions=1 result=sent; ida's turn starts (turn_start surface=buzz); the tally lands in the Slack thread within the budget. - Item 2: a job with budget >
turnTimeoutMsasked from Slack; verdict arrives in the Slack thread; report channel perannounce;SIGTERMmid-run → the thread gets the "host stopped" line. - Item 3:
@harry post "need eyes on #42" to Slack channel ops and tag mefrom Buzz by the owner →<@U…>prefix on the wire, one audit line naming the id; from a non-owner → refused, nothing posted.
Guided by SageOx

