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
- Add zhaolusi bot to a Feishu group
- Have a user @mention the bot in the group
- 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
Bug Description
When receiving a group message in Feishu, the session's
groupIdfield 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
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
Environment
groupPolicy: "open"andrequireMention: true