Skip to content

Feishu: groupId incorrectly set to sender open_id instead of group chat ID #78826

@Stephen-Tp

Description

@Stephen-Tp

Bug Description

When receiving a group message in Feishu, the session's groupId field is incorrectly set to the sender's open_id instead of the group chat ID.

This causes the embedded agent to be unable to reply to group messages because the tool policy drops the groupId (due to mismatch between caller-provided groupId and session-derived group context).

Steps to Reproduce

  1. Add zhaolusi bot to a Feishu group
  2. Have a user @mention the bot in the group
  3. Bot receives the message (confirmed in logs) but does not reply

Session Data

Session key: agent:zhaolusi:feishu:group:oc_f8380977f61fa0ec25bbbdebdeb90ff5

{
  "groupId": "ou_8e30b912972e84bbc307b54700a9dbd5",  // WRONG: sender's open_id
  "origin": {
    "from": "feishu:ou_8e30b912972e84bbc307b54700a9dbd5",
    "to": "chat:oc_f8380977f61fa0ec25bbbdebdeb90ff5"  // CORRECT group chat ID in origin.to
  }
}

Logs

effective tool policy: dropping caller-provided groupId that does not match session-derived group context
dispatch complete (queuedFinal=false, replies=0)

Environment

  • OpenClaw 2026.5.6
  • Feishu channel with WebSocket mode
  • groupPolicy: "open" and requireMention: true
  • Agent: zhaolusi

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    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