Skip to content

feat(agents): remove workflow restriction flag, explain ignored mentions, warn on owner-only agent mentions - #3141

Open
wpfleger96 wants to merge 8 commits into
mainfrom
hayt/remove-workflow-restricted-communities
Open

wpfleger96 wants to merge 8 commits into
mainfrom
hayt/remove-workflow-restricted-communities

Conversation

@wpfleger96

@wpfleger96 wpfleger96 commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Removes the BUZZ_WORKFLOW_RESTRICTED_COMMUNITIES build flag added in #2518, shows owners a note when their agent ignores a message from their own workflow, and warns in the workflow editor when the relay uses owner-only agent mentions (block/buzz#9227).

Removing the flag. This removes the vite.config.ts wiring, the gate in owner-attestation.ts and the harness call sites that passed the community, the AgentReads.origin field, the flag's tests, and its docs in configuration.md, workflows.md and buzz-help.md. The relay-signed buzz:workflow-mention check alone decides workflow delegation again. docs/workflows.md and docs/unread.md say that a relay using owner-only agent mentions may leave that tag off.

A note when an agent ignores the owner's workflow. mentionAuthority() sits next to fromOwner() and returns workflow when the owner's own workflow posted a mention without a buzz:workflow-mention for this agent. Every other refusal has no reason, including a direct mention from someone else and someone else's workflow, so those stay silent as on main.

fromOwner() is now mentionAuthority() === "owner". The Claude, Codex, Goose and Pi runtimes pass the reason to Delivery.ignored(refusal). The runner records it in local activity, and AgentDeclineNotes shows it under the message on the owner's device. On an owner relay (read with the editor's useWorkflowAgentMentions, only once a note exists) the note gives the community reason and points to Runs; elsewhere it says "‹Agent› didn't respond because this workflow message wasn't set up to direct agents." Nothing is published. Other rejections call ignored() with no reason and store and show no note. Two behaviour details:

  • A workflow message that doesn't name the agent never starts a profile read. A sibling's workflow is labelled workflow only if that profile was already read.
  • When a creator's profile can't be read, there is no reason, so no note shows.

An editor warning. useWorkflowAgentMentions reads the active community's NIP-11 workflow_agent_mentions field through nativeRelayInfo. A missing or unknown value counts as any. When the value is owner and a send_message step's text mentions an agent in the channel, the editor shows a warning while you edit:

  • Message, reaction or diff trigger with only Send Message and Delay steps: "Agents you mention respond only when you start this workflow, not when someone else does. This community limits which workflows can use agents, so other people can't use yours."
  • Webhook trigger, whatever its steps: "Agents won't respond to workflows started by a webhook. This community limits which workflows can use agents, so other people can't use yours."
  • Any non-webhook trigger with a step other than Send Message or Delay: "Agents won't respond to this workflow because it has steps other than Send Message and Delay. This community limits which workflows can use agents, so other people can't use yours."
  • Schedule trigger with only message and delay steps: no warning.

Block's build scripts drop the flag in https://github.com/squareup/buzz-releases/pull/146. This stays a draft until block/buzz#9227 is deployed to bb-block production.

@wpfleger96 wpfleger96 changed the title fix(agents): remove BUZZ_WORKFLOW_RESTRICTED_COMMUNITIES feat(agents): remove workflow restriction flag, explain ignored mentions, warn on owner-only agent mentions Nov 10, 2026
@wpfleger96
wpfleger96 marked this pull request as ready for review November 12, 2026 21:06
@wpfleger96
wpfleger96 requested a review from a team as a code owner November 12, 2026 21:06
@jmecom

jmecom commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

🤖 Security review of 3c814d50fed1421b518b353d2daab074972d0a3d: I recommend holding the rollout until the replacement relay policy is enforced and verified across every serving pod.

Removing the build restriction makes mentionAuthority accept any otherwise valid relay-signed buzz:workflow-mention, including one produced by an older relay or a pod running any. The new NIP-11 lookup controls warning text; it is not an authorization gate. I verified with the actual pre- and post-change authority functions that the same genuinely signed workflow event changes from denied to authorized. The listener's history cutoff limits replay reachability, so this is not a claim that an attacker can arbitrarily replay old messages.

Please keep the existing restriction until every production pod runs BUZZ_WORKFLOW_AGENT_MENTIONS=owner. For the permanent cutover, I recommend a distinct relay-signed assertion that the strict policy authorized this particular message, checked by the client. That also fails closed during mixed-version deployments and rollbacks. The existing signature, recipient, and ownership checks remain sound; 228 focused existing tests passed, and I found no additional security bypass in the other changes.

@wpfleger96
wpfleger96 force-pushed the hayt/remove-workflow-restricted-communities branch from 3c814d5 to 2f4ec1f Compare November 12, 2026 21:09

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 One non-blocking regression-coverage gap; no current functional defect demonstrated.

Comment thread src/bundled/codex/runtime.ts Resolved
@wpfleger96
wpfleger96 force-pushed the hayt/remove-workflow-restricted-communities branch from 2f4ec1f to bf74e9d Compare November 13, 2026 01:31
wpfleger96 and others added 8 commits November 13, 2026 11:57
Delete the build flag that kept workflow messages from authorizing local
agent requests in listed communities. Delegation is again decided only by
the relay-signed buzz:workflow-mention check, as before #2518. The relay's
secure workflows mode now withholds that tag for runs the owner or a timer
did not start.

Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
…mentions

A mention an agent refuses for who sent it now leaves a note under the
message, on the owner's device only. The reason comes from
mentionAuthority, next to fromOwner, which every bundled harness and the
plugin harness kit report through Delivery.ignored.

The workflow editor reads the community's NIP-11
workflow_agent_mentions and warns when agents mentioned in the
workflow's messages won't act on some or all of its runs.

Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
…usal

Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Only the owner's own workflow message that doesn't direct the agent gets a
note. Other ignored mentions stay silent, as before.
Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
Each runtime gives the workflow reason for its owner's workflow mention
that doesn't name it, and the runner keeps it for the decline projection.

Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
@wpfleger96
wpfleger96 force-pushed the hayt/remove-workflow-restricted-communities branch from bf74e9d to 27373c8 Compare November 13, 2026 17:12

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants