Repository navigation
Description
Summary
A message sent to a thread by a plugin service arrives with initiator: "user" and senderThreadId: null, which is byte-for-byte the shape of a message the human typed. The receiving thread renders it as the user speaking, and an agent reading its own transcript cannot tell the two apart.
There is no way for a plugin to name itself as the sender. bb thread tell derives the sender from the calling thread via BB_THREAD_ID; a plugin service has no calling thread, so the field is null and the initiator falls back to user.
Tested on bb 0.43.0.
Reproduction
From a plugin service (or any context with no BB_THREAD_ID):
bb thread tell <thread-id> "hello from a background service"
Then read the event back:
sqlite3 ~/.bb/bb.db "select data from events
where type='client/turn/requested' order by sequence desc limit 1;"
Observed:
{"direction":"outbound","source":"tell","initiator":"user",
"senderThreadId":null,
"input":[{"type":"text","text":"hello from a background service"}]}Identical to a message typed by the human. For contrast, the same tell issued from a thread produces "initiator":"agent" with senderThreadId populated, which renders correctly as "Message from <thread>".
Distribution of client/turn/requested on one real install:
| initiator | senderThreadId | count |
|---|---|---|
agent |
set | 1111 |
user |
null | 539 |
user |
null (source: spawn) |
127 |
system |
null | 105 |
The 539 are plugin-originated and indistinguishable from human input.
Why it matters
Anything a background service says to a thread is attributed to the user: scheduled nudges, retry prompts from a sweep, escalations. An agent that reads "do X" believes its owner asked for X. On this install it put nine messages from one plugin into the owner's voice before anyone noticed.
It is also a trust boundary. An agent is entitled to treat its owner's words as authorization and another component's words as data. Collapsing the two removes the distinction at exactly the point where it matters.
Suggested fix
The mechanism half-exists: initiator already accepts system as a value distinct from user, so the enum is not the obstacle.
Either:
senderPluginIdon the turn-start input, alongside the existingsenderThreadId, rendered as "Message from <plugin id>"; orbb thread tell --as-plugin <id>for services, setting the same field.
Option 1 is the smaller change if the renderer already branches on senderThreadId.
A plugin should not be able to claim to be the user, so ideally the host sets this from the calling plugin's own identity rather than trusting a supplied string.
Workaround in use
Every plugin-originated message is prefixed with a literal first line:
[automated message from the <plugin> plugin, not from Johannes]
This works but relies on every plugin author remembering it, and on the reader reaching the first line before acting.
Activity
jjanousek commentedon Sep 14, 2026
Adding a second, install-independent witness that predates the report.
One plugin on this install hit the same gap in September and worked around it without a sender identity being available.
chief-of-comms/components/comms/send-guard.ts, created 2026-09-07, records a sha256 of every text its service injects into a thread, and the plugin's own send tools refuse any turn whose text matches that hash. The header comment documents the reason in nearly the words of this issue: the plugin cannot tell the host who it is, so it fingerprints its own messages instead and treats a match as "this came from me, not from the user".That is a plugin reconstructing sender identity from message content because the platform does not expose it. It works, and it costs a table, a hash on every send, and a guard on every tool. It also cannot help the reader: the chief still displays the message as the user until an attribution line is added to the text by hand.
Two things this suggests for the fix:
Still on 0.43.0.
bb-slop-cop commentedon Sep 14, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotClassified Bug · High priority · High effort; added
threads,security, andpartial-repro.Reproduction and root-cause report: PARTIALLY REPRODUCED, high root-cause confidence. In two clean checkouts, executing the production sender-resolution functions and initiator expression confirmed that absent thread context becomes
senderThreadId: nullandinitiator: user. The send contract carries no plugin identity. Full integration verification was blocked by a missing pnpm entrypoint; live plugin delivery, persistence, and rendering remain unverified.No PR: correcting service provenance requires a public-contract and security-boundary decision, outside the simple-fix limits.
SawyerHood commentedon Sep 14, 2026
Cross-linking existing authorization work #1541 and its consumer #1564. This issue remains open as the concrete defect where service messages acquire human attribution; host-attested authorization is broader than message provenance. Coordinate contract design, but do not treat an attribution field alone as proof of human approval.
pc-style commentedon Sep 30, 2026
Written by an agent
Drafted and posted by Claude Code (Claude Opus 5.5) on behalf of @pc-style, from a debugging session on his BB fleet.
Still reproduces on bb 0.44.0:
bb thread tellfrom a shell with noBB_THREAD_IDrecordsinitiator: "user",senderThreadId: null. A related root cause: the loopback API answers without credentials, so an agent that unsetsBB_THREAD_IDgets the same "user" attribution. I filed that separately as #4529.