#9103: feat(message-tool): add responsePrefix support for agent identification
size: S
Cluster:
Agent Messaging Enhancements
## Summary
Adds responsePrefix template support to the message tool so proactive sends include the agent identity prefix (e.g., `[AgentName]`).
## Problem
- Agent replies through auto-reply flow get `[{identityName}]` prefix ✅
- Proactive sends via message tool don't get prefix ❌
- Users can't tell which agent sent proactive messages
## Solution
Apply `responsePrefix` in `message-action-runner.ts` after `maybeApplyCrossContextMarker`:
- Resolve `responsePrefix` from config
- Resolve `identityName` for current agent
- Prepend to message if not already present
## Changes
- `src/infra/outbound/message-action-runner.ts`: Apply responsePrefix after crossContextMarker
- `src/tui/`: Add agent name labels to assistant messages + lint fixes
## Testing
- ✅ Build passes
- ✅ Lint passes
## Configuration
Requires `messages.responsePrefix` and `agents.list[].identity.name` in config.
Most Similar PRs
#7516: feat(sessions): Auto-inject From:/To: identity headers in agent-to-...
by RusDyn · 2026-02-02
62.2%
#20868: fix: resolve {model} responsePrefix vars in non-agent-turn paths
by Operative-001 · 2026-02-19
60.8%
#6430: feat(protocol): include agent identity in hello-ok handshake response
by astoreyai · 2026-02-01
60.5%
#23356: feat(slack): pass agent identity via chat:write.customize
by keshav55 · 2026-02-22
59.1%
#22205: fix: expose resolvedTo as currentChannelId so sub-agents inherit th...
by Galygious · 2026-02-20
58.8%
#23226: fix(msteams): proactive messaging, EADDRINUSE fix, tool status, ada...
by TarogStar · 2026-02-22
58.6%
#22121: fix: resolve cross-context messaging policy from agent defaults
by AIflow-Labs · 2026-02-20
57.4%
#15030: Agents: support per-agent thinking defaults
by sauerdaniel · 2026-02-12
57.3%
#19932: feat(agents): suppressPreToolText config + onBlockReply buffering
by Milofax · 2026-02-18
57.3%
#11732: feat(plugins): add injectMessages to before_agent_start hook
by antra-tess · 2026-02-08
56.6%