You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ability to intercept or emulate agent messages in plugins #14451
I would like to know if there is a recommended way to:
Inject Agent Responses: Send a message that is visually and functionally treated as an "Assistant/Agent" output (including markdown/syntax highlighting).
Message Interception: A hook or middleware to intercept a message generated by the agent before it reaches the UI, allowing for real-time transformation.
Context
I am developing a plugin where I need to either intercept agent messages for transformation or send messages on behalf of the agent.
Current Behavior
Currently, using client.session.prompt with the noReply: true option allows sending a message to the session, but it has two main limitations for this use case:
User Role: The message is sent as the user, not the agent.
Formatting & Costs: These messages appear to consume input tokens and lack the syntax highlighting typically applied to agent outputs.
Activity
github-actions commentedon Feb 20, 2026
Thanks for updating the issue! It now follows the contributing guidelines and the
needs:compliancelabel has been removed.github-actions commentedon Apr 22, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.