fix(wrap): add RELAY_SKIP_PROMPT and self-echo filtering#641
Merged
khaliqgant merged 7 commits intomainfrom Mar 25, 2026
Merged
fix(wrap): add RELAY_SKIP_PROMPT and self-echo filtering#641khaliqgant merged 7 commits intomainfrom
khaliqgant merged 7 commits intomainfrom
Conversation
Two fixes for the wrap command when used in interactive terminal environments (e.g. Superset desktop app): 1. RELAY_SKIP_PROMPT=1 env var suppresses the <system-reminder> block that wraps injected messages. In interactive terminals, this XML noise confuses both the agent and the user. 2. Add RELAY_AGENT_NAME to self_names so messages sent by the agent's own MCP server (which registers with the same name) are filtered as self-echo instead of being re-injected into the PTY. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Only deliver DMs addressed to this agent. Previously all DMs on the workspace were injected into every agent's PTY. Channel messages (target starts with '#') are still broadcast to all subscribers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
e69e6b2 to
effe2aa
Compare
…d conversation_id targets Devin review caught that the filter was too aggressive — it silently dropped messages with empty targets (presence), 'thread' targets (thread replies), and dm_/conv_ prefixed targets (conversation_id fallback). Only drop messages clearly addressed to a different agent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RELAY_SKIP_PROMPT=1env var suppresses the<system-reminder>XML block in injected messages. Just delivers the raw relay message text.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 outputcargo testpasses (verified: all 85 unit + 12 continuity + 8 e2e tests green)Generated with Claude Code