openclaw - 💡(How to fix) Fix feat: stop AI inference when source message is withdrawn/recalled

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
  • Channel: Feishu (openclaw-lark)
  • Feishu error codes: 230011 (recalled), 231003 (deleted)
  • Related: larksuite/openclaw-lark#512 — plugin-level fallback for reply-on-withdrawn

Error Message

Currently, the channel plugin can only detect the withdrawal after inference completes (when the reply send fails with Feishu error code 230011/231003). By that time, the full AI inference has already run.

  • Feishu error codes: 230011 (recalled), 231003 (deleted)

Root Cause

  • Channel: Feishu (openclaw-lark)
  • Feishu error codes: 230011 (recalled), 231003 (deleted)
  • Related: larksuite/openclaw-lark#512 — plugin-level fallback for reply-on-withdrawn
RAW_BUFFERClick to expand / collapse

Problem

When a user sends a message and the bot starts AI inference, if the user withdraws the message during inference, the bot continues processing and eventually tries to reply. This wastes compute and may deliver content the user intended to hide.

Currently, the channel plugin can only detect the withdrawal after inference completes (when the reply send fails with Feishu error code 230011/231003). By that time, the full AI inference has already run.

Desired behavior

When the source message is withdrawn/recalled while AI inference is in progress:

  1. The channel should be able to signal the core to abort the in-progress inference
  2. The session should be cleaned up (no partial replies)
  3. No reply should be sent

Use cases

  • Private chat: User sends a message, realizes it was a mistake, withdraws it. The bot should stop processing immediately, not finish inference and then discard the reply.
  • Group chat: User asks a question, bot starts processing, user withdraws. Depending on config, the bot may want to stop or continue — but the channel should at least have the ability to signal withdrawal.

Proposed approach

Add a channel event mechanism (e.g., onMessageWithdrawn(messageId)) that the core can listen for. When triggered:

  1. Check if there's an active inference for that message
  2. If so, abort it (similar to user-initiated cancellation)
  3. Clean up the session state

This would be analogous to the existing cancellation mechanism but triggered by a channel event rather than user action.

Context

  • Channel: Feishu (openclaw-lark)
  • Feishu error codes: 230011 (recalled), 231003 (deleted)
  • Related: larksuite/openclaw-lark#512 — plugin-level fallback for reply-on-withdrawn

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING