Repository navigation
Description
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.
Summary
On a BB server, the HTTP API on 127.0.0.1 answers without credentials, and a request with no calling thread is recorded as the user (initiator: "user", senderThreadId: null). Any process on the server machine can therefore write a turn that looks exactly like one the human typed. That includes an agent that unsets BB_THREAD_ID, a plugin's shell-out, or a script. Nothing downstream can tell the difference.
Tested on bb 0.44.0, Linux, server bound to 127.0.0.1:38886, reached remotely through bb Connect.
Reproduction
-
On the server machine, with no token or cookie:
curl -s http://127.0.0.1:38886/api/v1/projectsIt returns the project list as JSON (HTTP 200).
-
From a plain shell on the same machine (no
BB_THREAD_ID):bb thread tell <thread-id> "deploy it"The target thread's
client/turn/requestedevent hasinitiator: "user"andsenderThreadId: null. That is the same shape as a message typed in the UI. Inside a thread, the CLI marks the sender from theBB_THREAD_IDenvironment variable, which the process can unset, or set to any other thread's id:BB_THREAD_ID=<another thread> bb thread tell <target> "…"is recorded as sent by that other thread.
Why it matters
Agents are told to act only on their owner's messages, and some tooling relies on "a user turn" meaning "the human said it". In our case, a plugin relays a human instruction to another thread and lets the worker check it against the human's turn. BB's event log can't support that check: it proves a user turn exists, not who wrote it. Prompt-injected agents with shell access are the realistic attacker. They don't need to escape anything, because the server trusts loopback.
This is related to, but narrower than:
- Plugin-originated thread messages are indistinguishable from user input (initiator=user, senderThreadId=null) #3621: plugin-originated messages are indistinguishable from user input. That covers attribution of plugin sends; this covers unauthenticated local callers in general.
- Host-verified operator authorization for plugin invocations and tool approvals #1541: host-verified operator authorization. This issue is a concrete, reproducible instance of the gap described there.
Suggested direction
- Authenticate loopback API requests. For example, the host daemon and CLI read a per-install secret from a file only the BB user can read, and requests without it are rejected. Agent processes get a scoped, per-thread token instead of the install secret.
- Derive sender attribution from that credential, not from
BB_THREAD_ID: a request made with a thread's token is always recorded as that thread (initiator: "agent",senderThreadIdset), whatever its environment says. - Record where a user turn came from (UI session, CLI with the install secret, plugin id) on
client/turn/requested, so plugins can require "typed in the UI" when they need it. - Document the current trust boundary: today, loopback equals the user.
Environment
- bb 0.44.0 (server, CLI and host daemon)
- Ubuntu on an exe.dev VM; server reached via bb Connect
- Claude Code 2.1.285 and Codex CLI 0.159.0 threads
AGENT GENERATED
Activity
SawyerHood commentedon Oct 19, 2026
Consolidated into #3708 at the maintainer's request. Added the source context, evidence links and any distinct/unverified follow-up scope to the canonical tracker: #3708 (comment)
Closing this report for tracking consolidation, not as fixed. Please continue investigation and updates in #3708; this report remains linked as original evidence.