openclaw - 💡(How to fix) Fix Bug: WebChat UI stuck in "In progress" after tool call timeouts

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…

After the assistant finishes generating a response (especially in sessions with multiple tool calls, some of which timeout), the WebChat UI remains stuck showing "In progress" with a red Stop button visible. The state never clears on its own. Only a page refresh resolves it.

Error Message

  1. Backend: Ensure the SSE stream always sends a terminal event (even on error/timeout paths) so the frontend can cleanly transition

Root Cause

Root Cause Hypothesis

Fix Action

Workaround

Refresh the webchat page.

RAW_BUFFERClick to expand / collapse

Bug: WebChat UI stuck in "In progress" state after assistant completes response

Description

After the assistant finishes generating a response (especially in sessions with multiple tool calls, some of which timeout), the WebChat UI remains stuck showing "In progress" with a red Stop button visible. The state never clears on its own. Only a page refresh resolves it.

Reproduction Steps

  1. Start a WebChat conversation with the assistant
  2. Ask a question that triggers multiple tool calls (e.g., web searches, MCP calls)
  3. Some of the tool calls timeout (e.g., MCP -32001: Request timed out)
  4. The assistant eventually completes and returns a final response
  5. Observe: the UI input bar still shows "In progress" badge and red "Stop" button

Expected Behavior

Once the assistant finishes responding, the "In progress" state should clear and the UI should return to the idle input state automatically.

Actual Behavior

The SSE/EventSource connection appears to lose the final completion event (likely due to the interrupted tool call flow), leaving the frontend in a perpetually "generating" state. Only a full page refresh restores the correct state.

Environment

  • OpenClaw version: Installed via Homebrew (latest)
  • Channel: WebChat (direct)
  • OS: macOS (Apple Silicon)
  • Browser: Any (reproducible across browsers)

Root Cause Hypothesis

When tool calls timeout mid-stream (especially MCP tool timeouts), the backend SSE stream may close or get interrupted before sending the final done/completion event. The frontend's EventSource listener never receives the completion signal, so the UI state machine stays in "in progress" indefinitely.

Suggested Fix

  1. Frontend: Add a client-side watchdog/timeout — if no SSE events are received for N seconds after the last assistant message was rendered, auto-clear the "in progress" state
  2. Backend: Ensure the SSE stream always sends a terminal event (even on error/timeout paths) so the frontend can cleanly transition
  3. Frontend: On reconnection, reconcile the "in progress" state by checking the actual session run status via API

Workaround

Refresh the webchat page.

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: WebChat UI stuck in "In progress" after tool call timeouts