Skip to content

[Bug]: Discord Components v2: outbound component messages not mirrored to target session transcript #21649

@androidStern

Description

@androidStern

Summary

When the agent sends a Discord Components v2 message (buttons/selects) via the message tool, the outbound
message is not recorded in the target session's transcript; when a user clicks a button, the interaction
routes correctly but the agent has no context about what the button was.

Steps to reproduce

  1. Configure Discord channel with Components v2 (default, agentComponents enabled).
  2. Send a message to the agent that causes it to respond with a Components v2 message containing buttons.
  3. Click a button immediately after it appears.
  4. Observe the agent's response.

Expected behavior

The agent receives the button click event in the same session and has full context of the component
message it sent, including button labels, purpose, and surrounding conversation. It responds
appropriately based on which button was clicked.

Actual behavior

The agent receives the button click (e.g. Clicked "NEBULA-4422".) but has no record of ever sending a
component message. It responds with no context, treating it as an orphaned/unknown interaction. Agent
literally responded: "These are all orphaned buttons from dead sessions."

OpenClaw version

2026.2.19-2

Operating system

macOS 15.7.3 (Intel x64)

Install method

bun global

Logs, screenshots, and evidence

2026-02-20T05:09:53.985Z warn [EventQueue] Slow listener detected: InteractionEventListener took 5871ms
  for event INTERACTION_CREATE
  Code trace: sendDiscordComponentMessage (src/discord/send.components.ts) sends the component via Discord
  REST API and registers entries in the in-memory component registry, but never calls
  appendAssistantMessageToSessionTranscript. Compare with the regular text send path which goes through
  executeSendAction → deliverOutboundPayloads → appendAssistantMessageToSessionTranscript.

  The component registry correctly stores sessionKey, agentId, and accountId on each entry (set via
  __sessionKey from resolveOutboundSessionRoute), so interaction callbacks route to the correct session.
  But the session transcript itself has no record of the outbound component message.

  This is a gap in the fix from #1520, which added outbound session mirroring for regular sends but
  predates the Components v2 send path added in v2026.2.15.

Impact and severity

  • Affected: All users receiving Discord Components v2 messages (buttons, selects, modals) from agents
    • Severity: High — Components v2 interactive features are completely non-functional from the agent's
      perspective
    • Frequency: 100% repro
    • Consequence: Every button click / select menu interaction arrives at the agent without context, making
      Components v2 unusable for any workflow that requires the agent to act on user selections

Additional information

The in-memory component registry correctly handles routing (sessionKey, agentId, accountId are all set
properly). The issue is solely that the outbound component message text/content is never appended to the
target session transcript. The suggested fix is to add an appendAssistantMessageToSessionTranscript call
in sendDiscordComponentMessage after registerDiscordComponentEntries, mirroring the pattern used in
executeSendAction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions