openclaw - 💡(How to fix) Fix Command queue has no priority support; latency-sensitive work blocked by background tasks [1 pull requests]

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…

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Problem

The command queue drains entries strictly FIFO within each lane. When latency-sensitive work (e.g. interactive replies) and background work (e.g. deferred maintenance) share the same lane, the background task blocks the interactive one for the full duration.

There is no way to express "this entry is more urgent" without creating a separate lane, which breaks the serialization guarantees callers depend on.

Impact

Users experience noticeable delays in interactive sessions when background tasks (plugin maintenance, deferred syncs, scheduled checks) happen to be enqueued ahead of a user-initiated action. The delay is the full execution time of the background task, which can be seconds or more.

Expected behavior

Callers should be able to assign a priority level to enqueued commands so that higher-priority work can jump ahead of lower-priority work within the same lane, while still preserving FIFO ordering among entries of equal priority. A starvation guard should ensure low-priority entries are never indefinitely blocked.

Proposed approach

Add a priority field to CommandQueueEnqueueOptions with levels like Low/Normal/High, where Normal is the default (fully backward compatible). The drain loop scans for the highest-priority entry instead of always popping index 0. A starvation mechanism promotes aged entries above High so a steady stream of high-priority work cannot indefinitely block older lower-priority entries.

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…

FAQ

Expected behavior

Callers should be able to assign a priority level to enqueued commands so that higher-priority work can jump ahead of lower-priority work within the same lane, while still preserving FIFO ordering among entries of equal priority. A starvation guard should ensure low-priority entries are never indefinitely blocked.

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 Command queue has no priority support; latency-sensitive work blocked by background tasks [1 pull requests]