Skip to content

[Bug]: sessions_spawn creates subagent with sourceChannel = "webchat" instead of original message channel #55931

@cuiyanlei2010

Description

@cuiyanlei2010

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

When a user sends a message from Feishu/Telegram/WhatsApp, and the main session calls sessions_spawn to create a child agent, the child agent's completion event is tagged with sourceChannel: "webchat" instead of the original message's channel. This causes the main session's response to be incorrectly routed to webchat instead of the original channel.

Steps to reproduce

  1. User sends a message from a Feishu group
  2. Main session calls sessions_spawn to create a child agent
  3. Child agent completes task and sends completion event via subagent_announce
  4. Main session receives subagent result with provenance.sourceChannel
  5. sourceChannel = "webchat" (should be "feishu")

Expected behavior

The child agent's completion event should have sourceChannel = "feishu" (or the original message's channel), so that the main session's response is correctly routed back to the Feishu group.

Actual behavior

The child agent's completion event has sourceChannel = "webchat", causing the main session's response to be routed to webchat instead of the Feishu group. User receives no response in the Feishu group.

OpenClaw version

v2026.3.24

Operating system

Linux 6.1.0-31-amd64 (x64)

Install method

No response

Model

glm-5

Provider / routing chain

OpenAI Completions API (coding-plan provider)

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crash

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions