openclaw - 💡(How to fix) Fix Feishu DM stop/停止 does not preempt active run; abort appears delayed until dispatch completes [4 comments, 2 participants]

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…
GitHub stats
openclaw/openclaw#51461Fetched 2026-04-08 01:10:54
View on GitHub
Comments
4
Participants
2
Timeline
4
Reactions
0
Timeline (top)
commented ×4

In Feishu direct-message chats, sending stop, /stop, or 停止 during an active run does not interrupt promptly. In practice, the stop message appears to be processed only after the current dispatch finishes.

This does not match the documented out-of-band abort behavior.

Root Cause

This is a safety / control-path issue. Users expect stop to interrupt an unintended or overly long action immediately, especially in chat-based control surfaces.

Fix Action

Fix / Workaround

Summary

In Feishu direct-message chats, sending stop, /stop, or 停止 during an active run does not interrupt promptly. In practice, the stop message appears to be processed only after the current dispatch finishes.

  1. User sends a message that starts a run
  2. While it is still running, user sends stop, /stop, or 停止
  3. The current run is not interrupted immediately
  4. The stop message seems to take effect only after the current dispatch finishes, if at all

Evidence collected

1) Feishu inbound is reaching the gateway

Gateway logs show normal inbound handling and dispatch, including patterns like:

RAW_BUFFERClick to expand / collapse

Summary

In Feishu direct-message chats, sending stop, /stop, or 停止 during an active run does not interrupt promptly. In practice, the stop message appears to be processed only after the current dispatch finishes.

This does not match the documented out-of-band abort behavior.

Docs / expected behavior

The docs say stop should abort the active run out-of-band:

  • docs/web/control-ui.md
    • Stop button calls chat.abort
    • typing /stop or standalone abort phrases like stop, stop action, stop run, stop openclaw, please stop should abort out-of-band
  • docs/tools/slash-commands.md
    • /stop targets the active chat session so it can abort the current run

Core code also appears to support this:

  • ABORT_TRIGGERS
  • normalizeAbortTriggerText(...)
  • isAbortRequestText(...)
  • tryFastAbortFromMessage(...)

These exist in the built core bundle and include both English and Chinese triggers, including stop, /stop, and 停止.

Environment

  • OpenClaw channel: Feishu
  • Chat type: direct message
  • Observed on local gateway deployment

Actual behavior

When a long-running task is active in a Feishu DM:

  1. User sends a message that starts a run
  2. While it is still running, user sends stop, /stop, or 停止
  3. The current run is not interrupted immediately
  4. The stop message seems to take effect only after the current dispatch finishes, if at all

User-facing result: Feishu behaves like "queue next message after current run", not "out-of-band abort current run".

Evidence collected

1) Feishu inbound is reaching the gateway

Gateway logs show normal inbound handling and dispatch, including patterns like:

  • received message from ...
  • Feishu[default] DM from ...
  • dispatching to agent
  • dispatch complete

So the problem does not look like "message never reached the gateway".

2) Docs + core support abort triggers

The stop phrases are documented and present in core abort logic.

3) Strong indication of serial processing in Feishu DM path

From gateway logs, the visible pattern is:

  1. received message
  2. dispatching to agent
  3. long gap while run is active
  4. dispatch complete
  5. only then the next message is processed

This suggests the Feishu DM path may be effectively serializing message handling per chat/session, so the second stop message is not entering the fast-abort path while the current run is active.

Likely cause

Most likely the Feishu DM integration is not allowing stop messages to bypass normal dispatch queueing.

Possible variants:

  1. Feishu inbound normalization / routing mismatch for DM path, so abort detection is not checked early enough
  2. Per-chat serialized dispatch prevents the stop message from being processed until the active run finishes
  3. Less likely: abort is recognized, but the active task is blocked inside a non-preemptible tool call

At the moment, the strongest evidence points to #2.

Suggested fix directions

Option A: Feishu fast-path for abort triggers

In the Feishu inbound path, before normal dispatch:

  • normalize incoming DM content
  • if it matches stop triggers (stop, /stop, 停止, etc.)
  • resolve the active chat/session
  • call the abort path directly (chat.abort / session abort)
  • return early instead of enqueueing normal dispatch

Option B: ensure active-run abort checks are truly out-of-band for Feishu

If a generic fast-abort path already exists, Feishu inbound should feed it before any per-chat serialization blocks the message.

Why this matters

This is a safety / control-path issue. Users expect stop to interrupt an unintended or overly long action immediately, especially in chat-based control surfaces.

If helpful

I can provide sanitized log snippets / timestamps from the local gateway logs showing the received message -> dispatching -> dispatch complete -> next message only after completion pattern.

extent analysis

Fix Plan

To address the issue of stop messages not interrupting active runs promptly in Feishu direct-message chats, we will implement a fast-path for abort triggers in the Feishu inbound path. Here are the steps:

  • Modify the Feishu inbound handler to normalize incoming DM content and check for stop triggers (stop, /stop, 停止, etc.) before normal dispatch.
  • If a stop trigger is detected, resolve the active chat/session and call the abort path directly (chat.abort / session abort).
  • Return early instead of enqueueing normal dispatch to ensure the stop message is processed immediately.

Example code snippet:

def handle_feishu_inbound(message):
    # Normalize incoming DM content
    normalized_message = normalize_message_content(message)

    # Check for stop triggers
    if is_abort_request_text(normalized_message):
        # Resolve active chat/session
        chat_session = resolve_chat_session(message)

        # Call abort path directly
        chat_session.abort()

        # Return early
        return

    # Proceed with normal dispatch
    dispatch_message(message)

Verification

To verify the fix, test the following scenarios:

  • Send a long-running task in a Feishu DM and then send a stop message (stop, /stop, or 停止) while the task is still running.
  • Verify that the task is interrupted immediately and the stop message is processed out-of-band.
  • Check the gateway logs to ensure the stop message is not being queued behind the active run.

Extra Tips

  • Ensure that the is_abort_request_text function is correctly implemented to handle both English and Chinese stop triggers.
  • Consider adding additional logging to track the processing of stop messages and verify that they are being handled correctly.
  • Review the Feishu documentation to ensure that the fast-path implementation aligns with their recommended approach for handling abort triggers.

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

openclaw - 💡(How to fix) Fix Feishu DM stop/停止 does not preempt active run; abort appears delayed until dispatch completes [4 comments, 2 participants]