openclaw - 💡(How to fix) Fix Support concurrent user turns during long-running tool execution [1 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#70003Fetched 2026-04-23 07:30:34
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
0
Timeline (top)
commented ×1
RAW_BUFFERClick to expand / collapse

Problem

When an assistant is executing a long-running tool (e.g., exec with background=false or sessions_spawn with mode="run" waiting for result), subsequent user messages are queued and only processed after the current turn completes.

Pain Points

This creates a "message queue" experience where the user cannot interrupt, steer, or ask questions while the assistant is busy. Especially painful with:

  • gbrain embed --stale (60-120s)
  • Large data processing tasks
  • Waiting for subagent results

Example Scenario

  1. User: "run benchmark" → spawns 5min subagent
  2. User (30s later): "actually stop that, do X instead"
  3. Current behavior: The "stop" message is queued for 4.5 minutes
  4. Desired behavior: New turn starts immediately, can cancel/override background task

Proposed Solutions

Option 1: Gateway-level concurrent turns

Allow multiple active turns per session. New turns can reference background task IDs via existing session state.

Option 2: Interrupt signal

User message during active turn cancels/suspends current turn and starts a new one (with context preservation).

Option 3: Background result channel

sessions_spawn / exec results delivered as separate system events rather than blocking the turn.

Priority

High for interactive workflows with background tasks (data processing, benchmark, code agents).

extent analysis

TL;DR

Implementing concurrent turns or an interrupt signal can help address the issue of queued user messages during long-running tasks.

Guidance

  • Consider Option 1: Gateway-level concurrent turns, which allows multiple active turns per session, enabling new turns to reference background task IDs via existing session state.
  • Explore Option 2: Interrupt signal, where a user message during an active turn cancels or suspends the current turn and starts a new one, preserving context.
  • Evaluate the feasibility of Option 3: Background result channel, where sessions_spawn / exec results are delivered as separate system events, rather than blocking the turn.
  • Assess the trade-offs between these options, considering factors like complexity, performance, and user experience.

Example

No code snippet is provided, as the issue description does not include specific implementation details.

Notes

The choice of solution depends on the specific requirements and constraints of the system, including performance, scalability, and user experience considerations. It is essential to evaluate the trade-offs between the proposed options and consider potential edge cases.

Recommendation

Apply a workaround, such as implementing Option 1: Gateway-level concurrent turns, as it seems to be a more feasible and flexible solution, allowing for multiple active turns per session and enabling new turns to reference background task IDs.

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 Support concurrent user turns during long-running tool execution [1 comments, 2 participants]