Skip to content

[Bug]: Webchat UI sends messages to wrong session when continuing a Feishu conversation #31573

@BeCreatedP

Description

@BeCreatedP

Bug type

Regression (worked before, now fails)

Summary

When a user starts a conversation in Feishu App and then continues it in Webchat UI by clicking on the Feishu session in the sidebar, new messages are routed to agent:main:main instead of the selected Feishu session, causing conversation misalignment where the agent responds to the previous message instead of the current one.

Steps to reproduce

  1. Start a conversation in Feishu App with the bot
  2. Open Webchat UI (http://localhost:18789)
  3. Click on the Feishu session in the left sidebar to continue the conversation
  4. Send a message in Webchat UI
  5. Observe that the agent responds to a previous message instead of the current one
  6. Check session logs: message went to agent:main:main instead of agent:main:feishu:direct:ou_xxx

Expected behavior

When user clicks on a Feishu session in Webchat UI and sends a message, the message should be routed to that Feishu session (agent:main:feishu:direct:ou_xxx). The agent should respond to the current message with context from the Feishu conversation history.

Actual behavior

The message is routed to agent:main:main instead of the selected Feishu session. This causes conversation misalignment - the agent responds to the previous message (from the Feishu session context) while the user's new message goes to a different session. The user experiences "one message delay" where they ask A, agent responds to the previous question B.

OpenClaw version

2026.3.1

Operating system

Windows 10

Install method

npm global

Logs, screenshots, and evidence

Impact and severity

Affected: Feishu users who use Webchat UI to continue conversations
Severity: High (breaks conversation continuity)
Frequency: 100% reproducible
Consequence: Users cannot effectively use Webchat UI to continue Feishu conversations; must stay in Feishu App or accept broken context

Additional information

Session analysis reveals:

  • Feishu session: agent:main:feishu:direct:ou_xxx with origin.provider = webchat (incorrect, should be feishu)
  • Main session: agent:main:main receives the messages instead
  • dmScope is configured as per-channel-peer

The root cause appears to be that Webchat UI does not correctly route messages to the selected session when clicking on an existing Feishu conversation in the sidebar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions