Prepend sender identity to channel messages for agent context#790
Open
pbranchu wants to merge 1 commit intoRightNow-AI:mainfrom
Open
Prepend sender identity to channel messages for agent context#790pbranchu wants to merge 1 commit intoRightNow-AI:mainfrom
pbranchu wants to merge 1 commit intoRightNow-AI:mainfrom
Conversation
The bridge now prefixes messages with [From: Name <email>] so agents know who is speaking. Essential for multi-user rooms and for agents that need to act on behalf of specific users (e.g., checking the correct email account or calendar). Updated bridge integration tests to match the new format. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
The channel bridge now prefixes messages with
[From: Name <email>]so agents know who is speaking.Problem
When messages arrive from channel adapters, the agent receives only the raw text with no sender context. In multi-user rooms, the agent has no way to know who sent the message. For agents that act on behalf of specific users (e.g., checking different email accounts or calendars), this makes it impossible to route correctly.
Fix
In
dispatch_message, prepend[From: Display Name <email>]to the text before sending to the agent. The email is sourced from thesender_emailmetadata field if available. If the display name is empty, the text is sent as-is.Updated bridge integration tests to use
contains()assertions instead of exact match.Test plan
cargo checkpasses🤖 Generated with Claude Code