Repository navigation
Conversation
The Agents2 host now sends a typing pulse (kind 20002) when a mention-started run begins and every 3 s after, in the mention's channel and threaded where the agent replies. Pulses stop when the run returns, or, for a type that hands its work off and returns early, when every promise it passed to the new `Delivery.workingUntil` has settled. They also stop when the agent goes away, after 30 minutes, or after a pulse fails, so a relay that refuses typing is asked once per run. Native may now sign kind 20002 for an agent. Pulses are signed through native directly and the agent's echoed pulses are not recorded as something it wrote, so they cannot push real messages out of that set. Needs the relay to accept typing over HTTP POST /events (block/buzz#8207). Signed-off-by: Bradley Axen <baxen@squareup.com> Co-authored-by: ART <ea39c1c8acf57180161ef4ba4ed68abf8589f5291956b909a5aa991fc66664ca@buzz.block.builderlab.xyz> Co-authored-by: Honey <8e307ae0076a4dab6b94b036ea3edc7e08f823a625269c1e6919e881a048b4d2@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude Code's run returns as soon as the turn is handed to its session, so typing stopped after the first pulse. Hand the turn's promise to `workingUntil` so the pulses last until the turn settles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Honey <8e307ae0076a4dab6b94b036ea3edc7e08f823a625269c1e6919e881a048b4d2@buzz.block.builderlab.xyz>
baxen
force-pushed
the
art/agents2-typing
branch
from
October 9, 2026 20:49
33fbe2f to
ade61ce
Compare
This was referenced Oct 11, 2026
Collaborator
Author
|
🤖 Superseded by #860 (local typing while an agent works), which is in the merge stack. Relay-backed typing can come back once block/buzz#8207 lands. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on block/buzz#8207. Until that relay change is deployed, the relay rejects every pulse. Each mention run then sends one failed pulse and stops, so nothing breaks, but no typing shows.
What it does
An Agents2 agent now shows as typing while it works on a mention, the same way
buzz-acpagents do.Agents2Service.drain): when a mention starts a run, the host signs a kind 20002 typing pulse right away and another every 3 s. It goes in the mention's channel and thread, tagged where the agent's reply lands:e <thread root> rootwhen the mention is already in a thread, pluse <mention> reply. Watch and timer runs send no typing, because they often post nothing.Delivery.workingUntil(promise). A type that hands its work off and returns fromrunearly can pass a promise for that work. Pulses then continue untilrunhas returned and every promise passed in has settled. Claude Code (Claude Code agents on Agents2 #732) returns fromrunabout 300 ms in, so it needs one call,workingUntil(done). That goes into Claude Code agents on Agents2 #732 when it rebases onto this.app_agent.rsKINDS). This part is ART's change.publish. The agent's own pulses that come back over the live stream are also kept out ofwrote, so they can't push real messages out of the set that makes replies to the agent count as addressed.Known gap
For a top-level mention the pulse is scoped to the thread the reply starts. That is the correct place, but you only see it with that thread open. The "agent working" indicator on the root message row (
MessageRow.tsxuseThreadAgents) and the sidebar dot only countsession.agentChoices, and Agents2 agents aren't in it. Mentions inside an open thread show typing. Fixing the root-row and sidebar indicators means bringing Agents2 agents into shared agent selection, which is a separate change.Testing
service.test.tshas 4 new cases using fake timers. They cover: the pulse tags for a thread mention and for a top-level mention; pulses continuing pastrunwhile handed-off work runs, then stopping; no typing for watch runs; stopping after a failed pulse and after the agent is removed; the 30-minute cap; and the agent's own echoed pulse not counting as something it wrote. I checked that the new tests fail when the hook or thewroteguard is removed.tscand biome.cargo test -p buzz-agent-controller app_agentand clippy pass.Agents2Servicewith native replaced by a stand-in that does what native does (attach the owner attestation, sign as the agent, NIP-98POST /eventswithx-auth-tag). A channel member's WebSocket received pulses at 0.02 s, 3.0 s and 6.0 s during a 7 sworkingUntilturn, and none after it ended. Each was taggedh+e <mention> reply+ the attestation. No 20002 rows were stored.To test by hand: run a local relay from block/buzz#8207 and point the desktop app at it. Mention an Agents2 agent inside a thread and open that thread. " is typing…" should appear within a moment and stay while the agent works. With #732 plus the
workingUntil(done)line, it should last through Claude's whole turn and clear when the reply posts.🤖 Generated with Claude Code