acpmux: a remote agent's report names its sender, never reads as the person's
Merged
TE
1mo ago+288+288+012345678901234567890123456789-22-22-01234567890123456789
Leo (relayed by claude-sr2, 2026-10-24): "these codexes, they're just not following the instructions. And, like what, do we not have the rendering situation going on for them yet? Like the proper attribution and whatever to make them show up, just like how the Opus ones do."
Cause
I checked claude-sr2's event log on cosmic-gray (~/.acpmux/sessions/01a15779…/events).
- Every report that drew a chip came from a session on cosmic-gray and carried
_meta.provenance:session_messagefrom the proven caller token, oragent_messagefromcmux agent message. - Every report from a lane on another machine (
acpmux-peer#…over the peer link,acpmux-outbox#…for--no-wait, andacpmux-cli#…forreach cosmic-gray 'acpmux send …') had no provenance and no sender, so the pane drew it as Leo's own words. Of the last 60 such reports, 0 named a sender.
Why:
- A peer hop strips provenance (
mark_forwarded), and the owning daemon never sees the caller proof. - The forwarder named the sender (
fromAgent) only for a--supersedeprompt. fromAgentalone was never recorded on theuser_message.- Over ssh, the session's env (its token) never arrives.
It isn't specific to Codex: Opus lanes on other machines lost their chip the same way.
Fix
- Peer forward (
server/peer_forward.rs): the forwarding daemon names the proven caller session (fromAgent) on every forwarded prompt, not only keyed ones. A prompt from the person carries no name. - Owning daemon (
server/requests.rs,prompt_provenance::named_sender): a prompt with a named sender and no provenance records{kind: "agent_message", from: "fromAgent", fromName, to}. The pane already draws that as the agent's card (incomingMessage.ts), so no GUI change is needed. A session's note to itself stays unmarked. - CLI (
cli/sender.rs): outside a session,acpmux sendnames its sender fromACPMUX_FROM. A companion leo-workspace PR makesreachexport it from the caller's session name. With no name and no session, the send is the person's: a person at a terminal is still the person.
Tests (red on the tests-only commit, green with the fix)
peer_integration::a_prompt_an_agent_sends_through_a_peer_names_that_agent_on_the_owning_daemon: two daemons. An agent in a session on A sends tob/coordinator, and B records it ascodex-lane's message; the person's prompt through A stays unmarked.hub_integration::prompt_provenance::a_prompt_that_names_its_sender_records_it_as_that_agents_message: covers a peer origin and a local origin, and checks that a self-note and the person's prompt stay unmarked.cli::senderunit tests, andincomingMessage.test.ts(a named sender becomes the card, no sender becomes the person's bubble).- Gallery:
agent-pane.remote-sender, variantsnamed(after) andunnamed(before).
Agent session: big-red
🤖 Generated with Claude Code
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.