-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Feishu webhook channel does not trigger afterTurn hook, messages not recorded #1097
Description
Bug Description
The Feishu (Lark) webhook channel in OpenClaw does not trigger the afterTurn context engine hook, causing all Feishu messages to be missing from messages.jsonl recordings.
Root Cause
When a Feishu message arrives via webhook, OpenClaw's Feishu plugin handles the message and sends a response, but the message handling code path does not call finalizeAttemptContextEngineTurn. This is the call site that triggers the context engine's afterTurn hook. In contrast, cron sub-agent sessions go through the standard agent runner pipeline and correctly hit finalizeAttemptContextEngineTurn, so their messages ARE recorded.
Impact
- Feishu session messages are never written to
messages.jsonl - Session memory extraction (L0/L1) never triggers for Feishu conversations
- OpenViking session shows
message_count: 0despite active conversation
Evidence
- OpenViking API direct call to add a message works correctly (proves server-side works)
- Cron sessions record correctly
- Feishu sessions have 0 messages in
messages.jsonl
Suggested Fix
The Feishu plugin needs to call the equivalent of afterTurn after processing each Feishu message, or ensure Feishu sessions go through the standard finalizeAttemptContextEngineTurn pipeline.
Environment
- OpenViking: 0.2.15
- OpenClaw: Feishu plugin
- Channel: Feishu webhook (event callback)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status