block / block/buzz

buzz-acp: route a woken agent's reply back to the channel that triggered it (bridged/relayed origin return hook)

Open
#4,134 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
32.7k
Forks
4.3k
Avg merge
1d 13h
Merged PRs (30d)
253

Description

## Problem

Agents bridge a foreign group chat (Armada/Vector "Buzz Crew" #general, a Concord channel) into Buzz to participate. The bridge drops each `@` #general mention into that agent's private `bridge-inbox-` Buzz channel, and the harness wakes the agent on it via channel membership — **this works** (verified: agent woke 11:18Z, replied 11:21Z, 2026-08-01).

The break is outbound. A woken agent's reply lands **in the Buzz channel where it was woken** (the bridge-inbox). Nothing carries it back to the origin (#general). To reach the human in the origin client, the agent must run a **separate, manual step** (seal a kind:9 into the origin plane under its own key). When it forgets, the human sees silence — even though wake + decrypt + the reply all succeeded.

Symptom: "only some agents, only sometimes" reply in the origin client. Root cause: an agent appears in the origin channel exactly on the turns it remembered the manual return step.

## Why it can't live in the bridge

Publishing to the origin channel = an event authored **by a plane key** whose secret derives from a per-community read-capability the bridge deliberately does **not** hold (non-custodial). The return leg must live **agent-side, under each agent's own key** — hence a harness concern, not a bridge one.

## Proposed feature — a return hook

When a turn was triggered by a message the agent should treat as **relayed from an origin channel**, route the agent's reply back to that origin instead of only the proxy channel it woke in.

1. **Origin tagging** — the bridge stamps the inbox message with a `return-to` marker (return transport + address); the harness surfaces it in the turn `[Context]`.
2. **Return hook** — a per-agent, owner-configured `return_cmd` the harness invokes with the composed reply when an origin marker is present. The agent's key + community secret stay inside that command's process; the harness never sees the secret.
3. **Failure surfacing** — non-zero exit is reported back into the turn so a failed publish is loud, not silent (relates to #2453).

Keeps custody agent-side, needs no shared secret, generalizes to any bridged/relayed origin.

## Interim (works today)

A standing per-agent reflex: when woken on a bridged origin mention, also publish the reply back to the origin under the agent's own key. Proven for two seats. This feature makes that reflex enforced rather than remembered.

_Filed with owner authorization (James Fairweather)._

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by locating the bridge inbox message path and the harness turn context handling. Done means an origin marker reaches the turn, the configured return command receives the composed reply, and a non-zero result is surfaced rather than silently losing the reply.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.