openclaw - 💡(How to fix) Fix [Bug] Async command cascade creates unstoppable approval loop — each approval generates delayed completion message, user commands blocked until all fire

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…

Severity: Critical
Reproducibility: Consistent when multiple exec commands are approved in quick succession
Session: 2026-04-21, 08:39-09:34 GMT+8, webchat channel


Root Cause

Severity: Critical
Reproducibility: Consistent when multiple exec commands are approved in quick succession
Session: 2026-04-21, 08:39-09:34 GMT+8, webchat channel


RAW_BUFFERClick to expand / collapse

Description

Severity: Critical
Reproducibility: Consistent when multiple exec commands are approved in quick succession
Session: 2026-04-21, 08:39-09:34 GMT+8, webchat channel


Problem Statement

When a user approves multiple exec commands in quick succession, each approval generates a separate asynchronous completion message that fires with significant delay. The system fires one completion message per approved command, long after the original task is finished. The user cannot stop the cascade, and any new commands they type are queued behind all the pending completions.

A 10-minute task becomes a 2+ hour session that cannot be ended early.


What Happens

  1. User approves 5-10 exec commands in quick succession
  2. Each command executes and completes almost instantly (code 0)
  3. The system queues a separate An async command the user already approved has completed system message for each one
  4. These messages fire one-by-one with 1-3 minute delays between each
  5. For each fired message, the agent produces a full assistant reply
  6. Even if the original task was completed after the first 2-3 completions, the remaining 30-50+ keep firing
  7. User has no way to stop or cancel the pending completions
  8. Any new user commands typed during the cascade are ignored until all pending completions have fired
  9. The session becomes effectively unusable for the duration of the cascade

Real Session Evidence

On 2026-04-21, between 08:39 and 09:34 GMT+8 (55 minutes):

  • 50+ sequential async completion messages fired
  • Each triggered a separate assistant reply
  • The original task (verifying iwencai skill installation) was complete within the first 5 minutes
  • The remaining 50 minutes were the system slowly firing queued completions
  • Commands were simple directory/file checks returning True or directory names

Impact

  1. Token/API cost burn: 50+ unnecessary assistant replies in a single session
  2. User experience: Cannot stop the cascade; must wait it out (2+ hours)
  3. Command queue blockage: User new commands are not processed until all pending completions fire
  4. Session hijacked: A simple file verification task consumes the entire session

Expected Behavior

  1. When a task is clearly complete, remaining queued async completions should be discarded
  2. User should be able to send a stop command to cancel all pending async completions
  3. Multiple async commands approved for the same logical task should batch their completions into a single system message
  4. New user commands should take priority over pending async completion messages

Environment

  • OS: Windows_NT 10.0.26200 (x64)
  • Model: alibailian/qwen3.6-plus
  • Channel: webchat
  • Shell: PowerShell
  • Security mode: ask=on-miss

Suggested Fixes

  1. Task conclusion detection: Add a flag when the agent marks a task complete; discard pending async completions
  2. User stop control: Add a /stop command or button to cancel all pending async completions
  3. Batch completions: Batch results for commands approved in the same logical task
  4. Priority queue: New user commands should preempt pending async completion messages
  5. Timeout on stale completions: Discard completions that fire more than N minutes after task completion

extent analysis

TL;DR

Implement a task conclusion detection mechanism to discard pending async completions when a task is marked complete.

Guidance

  • Identify the conditions under which a task is considered complete and set a flag to trigger the discarding of pending async completions.
  • Consider implementing a user stop control, such as a /stop command or button, to cancel all pending async completions.
  • Review the current queuing mechanism to prioritize new user commands over pending async completion messages.
  • Explore batching completions for commands approved in the same logical task to reduce the number of system messages.

Example

# Pseudo-code example of task conclusion detection
if task_completed:
    discard_pending_completions()
    # Clear the queue of pending async completion messages

Notes

The provided suggestions are based on the information given in the issue and may require further refinement or modification to fit the specific implementation details of the system.

Recommendation

Apply a workaround by implementing a task conclusion detection mechanism to discard pending async completions when a task is marked complete, as this seems to be the most straightforward solution to address the immediate issue.

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 [Bug] Async command cascade creates unstoppable approval loop — each approval generates delayed completion message, user commands blocked until all fire