Repository navigation
Closed
BingqingLyu/openclaw
#370Labels
P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
Description
Summary
Control UI chat can get stuck in a busy state after a long-running chat.send run. When that happens, the next user message is queued in the UI but never flushes automatically. Sending another message later can cause the previous queued work to resume.
Symptoms
- A long task appears to stop progressing in the Control UI chat
- The compose box still accepts input, but the next message does not actually send
- The message is queued behind the stale run
- After another manual prompt (for example, "continue your job"), the session resumes and the queued work can continue
Expected behavior
- If the original run has already finished on the gateway, the UI should recover automatically
- Queued messages should flush once the previous run is no longer active
- The user should not have to send another prompt just to unstick the session
Actual behavior
- The UI can remain blocked by a stale
chatRunId - Queued messages stay in the queue because the UI never sees the terminal event that would normally clear the busy state
Root cause hypothesis
The backend already supports agent.wait for chat.send runs, including cases where the run finishes without normal lifecycle events. The Control UI appears to rely only on chat terminal events to clear chatRunId, so a missed final/error/aborted event can leave the session stuck busy.
Why this matters
This makes long-running chat interventions unreliable in the dashboard. The user sees work stop, types a follow-up message, and that message silently waits instead of going out.
Evidence
- Reproduced in the Control UI chat with a long-running task
- Existing backend tests already cover
agent.waitresolvingchat.sendruns without lifecycle events - UI code paths show the queue only flushes once the busy state is cleared
Reacted by clawsweeper
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Activity
clawsweeper commentedon Apr 27, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 19, 2026, 5:51 AM ET / 09:51 UTC.
Summary
Keep open: current Control UI blocks the durable outbox while a local run marker remains, and its recovery only clears that marker from a terminal event or an inactive/terminal session row. The reported missed-event path therefore remains plausible, and the open linked repair is the canonical path rather than a reason to dispatch duplicate work.
Reproducibility: yes. source provides a high-confidence deterministic fault path: retain chatRunId, drop the terminal event and inactive session update, then enqueue a visible-session follow-up. I did not execute that path in this read-only review.
Regression provenance
Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.
Next step
An open linked repair already owns the same owner-boundary fix, so another automated fix PR would duplicate active work.
Review details
Best possible solution:
Review and land the owner-boundary repair in #126180 after exact-run fault proof covers dropped terminal and session-state events.
Do we have a high-confidence way to reproduce the issue?
Yes, source provides a high-confidence deterministic fault path: retain chatRunId, drop the terminal event and inactive session update, then enqueue a visible-session follow-up. I did not execute that path in this read-only review.
Is this the best way to solve the issue?
Yes: recording an exact terminal-run fact at the Gateway lifecycle owner and consuming it at the existing UI recovery boundary is safer than adding a browser watchdog or speculative timeout.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against 7bf21bc824c5.
Label changes
Label justifications:
P1: A normal Control UI chat workflow can leave a user follow-up unsent until the user manually intervenes.impact:session-state: A stale local run identity incorrectly keeps the selected chat session busy after the Gateway has settled.impact:message-loss: The affected queued message is suppressed indefinitely rather than automatically delivered after the prior run ends.Evidence reviewed
What I checked:
ui/src/pages/chat/run-lifecycle.ts:544, 7bf21bc824c5)ui/src/pages/chat/chat-outbox-drain.ts:309, e71fc902eece)ui/src/pages/chat/run-lifecycle.ts:582, e71fc902eece)ui/src/pages/chat/chat-state-events.ts:106, e71fc902eece)ui/src/pages/chat/run-lifecycle.ts:544, f0b40777b85b)Likely related people:
ui/src/pages/chat/run-lifecycle.ts,ui/src/pages/chat/chat-state-events.ts)ui/src/pages/chat/chat-outbox-drain.ts,ui/src/pages/chat/run-lifecycle.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.openclaw-barnacle commentedon Jun 8, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
8 remaining items
wnzzer commentedon Jul 16, 2026
Still reproduces on OpenClaw 2026.7.1 (commit
2d2ddc4) — Web/Control UI, browser.Confirming this is still present on the latest release. Exact scenario:
mainagent, browser Web UI.The workaround described in the issue is confirmed working: sending one more message clears the stale busy state and the queued message finally goes out.
Screenshot detail: the assistant's reply finished at 21:50, and the follow-up message stayed frozen in
Queued (1)afterward — never sent.The linked fix PR #90618 still appears open/unmerged — is anything blocking it from landing? Happy to help test a build.
clawsweeper commentedon Aug 23, 2026
Fixed by PR #126180, merged as a77fbde. The Gateway now records the exact terminal client run across lifecycle and restart-recovery owners, and the Control UI releases only the matching queued follow-up. Focused browser, Gateway, protocol-generation, exact-head CI, autoreview, and three consecutive clean ClawSweeper reviews passed.