Skip to content

fix(send): require explicit --broadcast for AI-tool broadcasts#94

Open
zane668 wants to merge 1 commit into
aannoo:mainfrom
zane668:upstream/send-broadcast-optin
Open

fix(send): require explicit --broadcast for AI-tool broadcasts#94
zane668 wants to merge 1 commit into
aannoo:mainfrom
zane668:upstream/send-broadcast-optin

Conversation

@zane668

@zane668 zane668 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • require an explicit --broadcast flag for no-target sends made from inside an AI tool
  • stop treating --go or a small recipient count as broadcast authorization
  • keep human CLI sends, explicit targets, replies, and resolved threads unchanged
  • update send --help and the broadcast preview to show the new opt-in

This closes a failure mode where a missing target argument, such as an empty shell variable, silently woke every active agent. The dedicated flag makes the high-fanout action explicit without adding new restrictions to normal targeted delivery.

Verification

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features --locked -- -D warnings
  • cargo test --locked: 1970 unit tests and 21 CLI smoke tests passed; 0 failed
  • focused regressions cover --go rejection, explicit --broadcast, the former two-recipient bypass, and help text

Upstream CI baseline

Current main has independent Rust 1.97 Clippy and cargo-dist workflow failures addressed by #91. This PR deliberately does not include those baseline changes; it should be refreshed after #91 lands.

No-@target sends from inside an AI tool silently became broadcasts, and
the soft preview guard was bypassed by a habitual --go and skipped
entirely for <=3 recipients. Real incident: an agent's empty shell var
turned a targeted send into an all-agents broadcast.

Broadcast authorization is now its own opt-in: 'hcom send --broadcast'.
--go no longer implies everyone; recipient count no longer matters.
Human (non-AI-tool) CLI behavior is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Session: 019f670f-78bf-7b72-95c5-ab7fb1b23700
Producer: ai-session
Tool: codex
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.

1 participant