Agent pane: an agent's "[name]" or "From name:" signature names its message on every path

Merged
TE
15d ago
+103-11

Leo-ask: ask-f55c0db9bf

An agent signs what it sends: [land-and-ci-c9] Not idle. #22674 is … or From claude-sr2: still live …. Only a shell's acpmux send (#23775) and Claude Code's envelope (#23838) read the bracketed form, so a message acpmux delivered with provenance (acpmux send inside a chat, a sub-session family's message, cmux agent message) showed under the chat's title with the signature still in its text, and nothing read "From name:".

Now every inbound path (incomingPrompt in conversation/incomingMessage.ts) reads both forms:

  • the signature names the sender's chip and is stripped from the message's text;
  • provenance still gives the chat the chip opens (sessionId) and who it is to this chat (relation);
  • "From" before words that are no agent's name ("From now on:", "From Monday:") and tags in brackets ([WIP], [1/3], [P1]) stay text. A name counts when it is lower-case words joined by - or / (#23838's ENVELOPE_AGENT); the shell path keeps its looser bracket rule.

Tests

incomingMessage.test.ts, one fixture per envelope shape: acpmux send in a chat (session_message, "[land-and-ci-c9] …"), a sub-session family's "From claude-sr2: …" (relation kept), SendMessage (Claude Code's <cross-session-message> after its preface line, "From claude-sr2: …"), a peer relay (acpmux-peer#huge-blue, "[lane-x] …" and "From claude-sr2. …"), cmux agent message (rendered body, "[coord-deputy] …"), and the negatives above. The shell test's provenance case now expects the signature's name, with the chat kept.

Observed / Not run

  • Ran on huge-blue at c9a99cd: bun test src/agent-session/acpmux/conversation/incomingMessage.test.ts (22 pass, 0 fail) and tsc --noEmit -p tsconfig.json (clean). vp fmt and prepush-gate.py (no new violations) here.
  • Not run: the full webview suite (CI runs it).

Changelog

Fixed: Another agent's message signed "[name]" or "From name:" shows that name on its chip and drops the signature from its text, however it was delivered.

Agent session: cosmic-gray

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the agent pane so an agent's message signed with [name] or From name: shows that name on its sender chip and drops the signature from the text, on every delivery path. Previously only a shell's acpmux send and Claude Code's envelope read the bracketed form; messages delivered with provenance kept the signature in their text under the chat's title, and no path read From name:.

Every inbound path now reads both forms:

  • Provenance still gives the chat the chip opens and the sender's relation to it.
  • Text that is not a signature—From now on:, [WIP], [1/3]—stays as text.