Skip to content

fix(feishu): bypass per-chat queue for control commands#484

Open
BingqingLyu wants to merge 1 commit into
mainfrom
fork-pr-43512-fix-feishu-command-queue-bypass-42803
Open

fix(feishu): bypass per-chat queue for control commands#484
BingqingLyu wants to merge 1 commit into
mainfrom
fork-pr-43512-fix-feishu-command-queue-bypass-42803

Conversation

@BingqingLyu

@BingqingLyu BingqingLyu commented Apr 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bypass the per-chat serialization queue for control commands (/stop, /new, /status, etc.) in the Feishu message monitor
  • Detect control commands before enqueueing to the debouncer and dispatch them directly, so they execute immediately even when an active agent run holds the chat queue

Root cause

extensions/feishu/src/monitor.account.ts serializes all same-chat events through a per-chat queue (createChatQueue()). Since command-only Feishu messages also went through that queue, /stop//new//status could not execute until the active run finished.

Fix

  • Added isControlCommand() check in the im.message.receive_v1 handler that detects text messages matching known control commands via core.channel.text.hasControlCommand()
  • When a control command is detected, it is dispatched directly via handleFeishuMessage() instead of going through the debouncer and chat queue
  • Non-command messages continue through the existing debounce + queue path unchanged

Test plan

  • All 348 Feishu extension tests pass (pnpm test extensions/feishu/)
  • Manual: send /stop during an active Feishu agent run and verify it executes immediately

Closes openclaw#42803

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Feishu text commands (/stop, /new, /status) no longer bypass queue during active agent run (3.8 regression)

2 participants