Skip to content

[Bug]: [Feishu] Typing indicator (reaction emoji) keepalive loop never stops - onIdle/onCleanup not called #27598

@Chowei11

Description

@Chowei11

Summary

Feishu typing indicator (emoji reaction) keepalive loop never stops after reply is sent, causing ghost emoji reactions on messages

Steps to reproduce

  1. Configure Feishu channel with typingMode: "message"
  2. Send a message to the bot via Feishu DM
  3. Bot processes and replies successfully
  4. Observe: the "Typing" emoji reaction remains on the user's message permanently
  5. Gateway log shows addTypingIndicator keepalive loop firing every 3 seconds indefinitely, removeTypingIndicator is never called

Expected behavior

After the bot's reply is sent, onIdle/onCleanup should be called, which stops the keepalive loop and removes the Typing emoji reaction from the message.

Actual behavior

The keepalive loop in createTypingCallbacks runs indefinitely after reply completes. fireStop (assigned to onIdle/onCleanup) is never called. The Typing emoji reaction permanently remains on the message.

OpenClaw version

2026.2.25

Operating system

macOS 26.3

Install method

npm global

Logs, screenshots, and evidence

Debug logging added to extensions/feishu/src/typing.ts shows:
- addTypingIndicator called correctly, returns valid reactionId
- keepalive loop fires every ~3s, re-adding Typing reaction
- removeTypingIndicator is NEVER called (no "typing remove" log appears)
- dispatch complete (queuedFinal=true) confirms reply was sent
Root cause trace in createTypingCallbacks (plugin-sdk/reply-*.js):
fireStop is assigned to onIdle and onCleanup, but neither is invoked after normal reply completion. The deliver function in reply-dispatcher.ts only calls typingCallbacks.onIdle?.() in onError and onIdle paths, but the normal completion path does not trigger these callbacks.

Impact and severity

High - affects all Feishu users with typingMode enabled. Ghost emoji reactions accumulate on every message, no workaround other than disabling typing entirely (typingMode: "never").

Additional information

Workaround: set typingMode: "never" to disable typing indicator entirely.

The issue is in the core createReplyDispatcherWithTyping function, not specific to the Feishu plugin. The Feishu plugin's addTypingIndicator/removeTypingIndicator work correctly when called directly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions