fix(wrap): add RELAY_SKIP_PROMPT and self-echo filtering
Merged
KH
8mo ago+137+137+012345678901234567890123456789-26-26-01234567890123456789
Summary
RELAY_SKIP_PROMPT=1env var suppresses the<system-reminder>XML block in injected messages. Just delivers the raw relay message text.- Adds
RELAY_AGENT_NAMEto the broker'sself_namesset so messages from the agent's own MCP server are filtered as self-echo.
Motivation
When the wrap command is used in interactive terminals (Superset desktop app), the system-reminder block confuses both agents and users. The self-echo issue occurred because the MCP server inside the agent registers with the same name but the broker didn't recognize it as "self".
Test plan
-
RELAY_SKIP_PROMPT=1 agent-relay-broker wrap claude -- --help— no system-reminder in output - Agent posting to #general doesn't see its own message echoed back
-
cargo testpasses (verified: all 85 unit + 12 continuity + 8 e2e tests green)
Generated with Claude Code