Treat ambient group chatter as room events#81317
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: not applicable. as a current-main bug reproduction: this PR adds a new opt-in room-event mode, and current main does not contain the Real behavior proof Next step before merge Security Review detailsBest possible solution: Land the room-event model only after maintainer approval confirms the new config and protocol surface, preserving the compatibility default and strict message-tool-only visible delivery for room events. Do we have a high-confidence way to reproduce the issue? Not applicable as a current-main bug reproduction: this PR adds a new opt-in room-event mode, and current main does not contain the Is this the best way to solve the issue? Unclear until maintainer product approval because the PR adds new user-facing config plus protocol and tool-surface propagation. From code review, the approach is cohesive and I found no narrow blocking correctness defect. Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 0b7ff665f664. |
|
Simple behavior summary:
What changes is the shape of the turn. Ambient group chatter is now a room event, not a fake direct user request. Example: All of those messages can be observed as room events. The model still sees them, so on the last one it can decide, "this is clearly for me," and reply visibly by calling The important difference: normal final assistant text no longer automatically leaks into the group for ambient chatter. The agent can still reply without an explicit @tag, but visible speech is now a deliberate message-tool action instead of the default output path. |
Telegram E2E proofRan against
|
|
Addressed review findings in
Verification:
@clawsweeper re-review |
|
Follow-up pushed in
Additional verification:
|
|
Follow-up pushed in
Additional verification:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
d11cb3c to
545b2b1
Compare
|
Running OpenClaw on Feishu with group chats, so this change is directly relevant to my setup. The current behavior — every ambient group message triggering a full agent turn — creates a few practical problems I've been working around:
The room-event model solves all three cleanly. Ambient messages become context without triggering visible agent behavior — which is exactly the right semantic. One question about the implementation: does the room-event context have a size limit or TTL? In a busy group, the accumulated room context before a tagged request could get large. I'm curious whether there's a mechanism to bound it (e.g., last N messages, or last M minutes) or whether that's left to the model's context window management. Context: Running OpenClaw as a persistent agent on a Feishu group, with cron-scheduled tasks and always-on group monitoring. |
545b2b1 to
14cd004
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
14cd004 to
9a05098
Compare
9a05098 to
8334e8d
Compare
faef55d to
4f4a874
Compare
482e182 to
b8c5a79
Compare
b8c5a79 to
b8f52e7
Compare
|
Landed via rebase merge onto main.
Thanks @obviyus! |
Summary
Verification
pnpm test extensions/telegram/src/bot-message-dispatch.test.ts extensions/telegram/src/bot-message-context.reactions.test.ts extensions/telegram/src/bot-message-context.require-mention.test.ts src/channels/turn/context.test.tspnpm check:architecturepnpm check:changedReal behavior proof
message(action=send).7787and SUT replied7788withOPENCLAW_E2E_OK; ambient no-leak sent7789and observed no SUT reply with provider requests1; ambient message-tool send sent7790and SUT replied7791withOPENCLAW_E2E_TOOL_SEND_81317; room-context carry-forward sent ambient7792, tagged request7793, and SUT replied7794withOPENCLAW_E2E_CONTEXT_SEEN_81317.