Agent pane: a shell's `acpmux send` "[name] text" draws as that agent's message line
In progress: review and CI pending.
What. Agents running acpmux send from a shell put their name first by convention: [coord-deputy] Merged #23727. That path records no provenance, so these prompts drew as the person's own bubble. Every one of the 1,336 such records on a coordinator Mac had client acpmux-cli#… or acpmux-peer#… and no provenance.
incomingPrompt (conversation/incomingMessage.ts) now treats such a prompt as that agent's message when all of these hold:
- there is no provenance
- the client is
acpmux-cli#…oracpmux-peer#… - the text starts with a bracketed name of one to four words, followed by a body
It then draws as the incoming line from #23727: the sender's chip, a preview, and the glass card. No chat id comes with the message, so the chip finds the listed chat with that name (useSenderChat). The prompt as typed stays under Details.
These are not taken as senders and stay the person's:
- Claude Code's
[Request interrupted …] - cmux's own
[cmux agent message]header - a sentence in brackets
- a bare
[name]with no body - any other client's bracketed prompt
When provenance is present, it still names the sender.
Tests. incomingMessage.test.ts has a new case covering both clients, a multi-line body, the rejections above, other clients, and provenance precedence. The regexes were also checked by hand in node. Bun tests run on CI only, since builds and tests are blocked on this Mac.
Overlap. #23183 (reply-in-place) touches the same two files but changes other parts of them.
Agent session: cosmic-gray
🤖 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.
Summary by cubic
Fixes the agent pane so a shell acpmux send prompt that starts with an agent's name in brackets — like [coord-deputy] Merged #23727 — draws as that agent's message line instead of the person's own bubble. These records carry no provenance, so incomingPrompt now matches the acpmux-cli#… and acpmux-peer#… clients together with a bracketed one-to-four-word name followed by a body.
The chat chip finds the listed chat by name, and the prompt as typed stays under Details. Bracketed text that isn't a sender stays the person's: Claude Code's interruption note, cmux's own [cmux agent message] header, a sentence in brackets, and a bare [name] with no body. Prompts with provenance still name the sender.