openclaw - ✅(Solved) Fix [Bug]: Webchat UI stuck in "thinking/in progress" state after LLM response completes [2 pull requests, 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#84041Fetched 2026-05-20 03:44:50
View on GitHub
Comments
1
Participants
2
Timeline
13
Reactions
2
Timeline (top)
labeled ×7cross-referenced ×3closed ×1commented ×1

After the LLM response is fully generated and displayed, the webchat left panel remains stuck in "thinking/in progress" state and never transitions to "done".

Root Cause

Root cause analysis via frontend code inspection (control-ui/assets/index-quv2B8bV.js):

Fix Action

Fix / Workaround

Possible failure modes:

  1. Yv() state transition function is not called with outcome: 'done' after turn completion
  2. Zv() self-check function returns false because session.hasActiveRun or status data is stale
  3. WebSocket sessions.subscribe event (sessions.patch/sessions.update) is delayed or dropped
  4. chatRunId is set but never cleared by completion event

PR fix notes

PR #84057: [codex] Fix Control UI terminal run status recovery

Description (problem / solution / changelog)

Summary

  • stop treating terminal session rows as active runs when hasActiveRun lingers after completion
  • let terminal chat run status win over stale abortable UI so the Control UI returns to done instead of staying in progress
  • add regressions for abort recovery, terminal session refresh, chat rendering, and session badges

Closes #84041.

Verification

  • node scripts/run-vitest.mjs ui/src/ui/app-chat.test.ts ui/src/ui/controllers/sessions.test.ts ui/src/ui/views/chat.test.ts ui/src/ui/views/sessions.test.ts
  • node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json ui/src/ui/session-run-state.ts ui/src/ui/app-chat.ts ui/src/ui/chat/run-lifecycle.ts ui/src/ui/views/chat.ts ui/src/ui/views/sessions.ts ui/src/ui/app-chat.test.ts ui/src/ui/controllers/sessions.test.ts ui/src/ui/views/chat.test.ts ui/src/ui/views/sessions.test.ts
  • node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.ui.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/test-ui-issue-84041.tsbuildinfo
  • git diff --check -- ui/src/ui/session-run-state.ts ui/src/ui/app-chat.ts ui/src/ui/chat/run-lifecycle.ts ui/src/ui/views/chat.ts ui/src/ui/views/sessions.ts ui/src/ui/app-chat.test.ts ui/src/ui/controllers/sessions.test.ts ui/src/ui/views/chat.test.ts ui/src/ui/views/sessions.test.ts

Real behavior proof

Behavior addressed: Control UI now returns to the terminal Done state when a session row still carries stale hasActiveRun: true after completion, so stale Stop and reading UI do not linger and context compaction becomes available again.

Real environment tested: Local macOS source checkout rendered the current branch Control UI chat surface with current ui/src/ui/views/chat.ts code, current Control UI CSS, and a real Chromium page.

Exact steps or command run after this patch: Ran a one-off local tsx proof script from the current checkout that rendered the current renderChat() output for status: "done" plus stale hasActiveRun: true, loaded that HTML into Chromium, queried the visible Control UI DOM, and saved a screenshot.

Evidence after fix (screenshot, recording, terminal capture, console output, redacted runtime log, linked artifact, or copied live output): Browser console output / terminal capture from the Chromium render:

runStatusLabel=Done
hasDoneStatus=true
hasInProgressStatus=false
stopButtonCount=0
readingIndicatorCount=0
compactDisabled=false
compactLabel=Compact
visibleText="Val Ready to chat Type a message below · / for commands What can you do? Summarize my recent sessions Help me configure a channel Check system health 95% context used 190k / 200k Compact Attach file Start Talk Done New session Export Send"

Observed result after fix: The current branch render shows the terminal Done chip, no in-progress chip, no Stop button, no reading indicator, and an enabled Compact action even when the same session row still reports hasActiveRun: true.

What was not tested: I did not run the reporter's exact custom local provider setup or capture a full live network/provider round-trip; this proof is a real Chromium render of the current Control UI surface for the stale terminal session state that triggered the bug.

Changed files

  • ui/src/ui/app-chat.test.ts (modified, +15/-0)
  • ui/src/ui/app-chat.ts (modified, +2/-1)
  • ui/src/ui/chat/run-lifecycle.ts (modified, +2/-1)
  • ui/src/ui/controllers/sessions.test.ts (modified, +1/-1)
  • ui/src/ui/session-run-state.ts (added, +13/-0)
  • ui/src/ui/views/chat.test.ts (modified, +45/-0)
  • ui/src/ui/views/chat.ts (modified, +9/-4)
  • ui/src/ui/views/sessions.test.ts (modified, +15/-1)
  • ui/src/ui/views/sessions.ts (modified, +2/-1)

PR #84112: [codex] Fix Control UI terminal run status recovery

Description (problem / solution / changelog)

Makes https://github.com/openclaw/openclaw/pull/84057 merge-ready for the ClawSweeper automerge loop. The edit pass should inspect the live PR diff, review comments, and failing checks; rebase if needed; keep the contributor branch credited; and stop only when validation is green or an external blocker is proven.

ClawSweeper 🐠 replacement reef notes:

<!-- clawsweeper-automerge-requested-by login="Takhoffman" id="781889" -->
  • Repair fallback: GitHub rejected the repair branch push because it updates workflow files and the ClawSweeper app token does not have workflows permission

Inherited issue-closing references from the source PR: Closes #84041

Co-author credit kept:

fish notes: model gpt-5.5, reasoning high; reviewed against f9f503add0ab.

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • ui/src/ui/app-chat.test.ts (modified, +15/-0)
  • ui/src/ui/app-chat.ts (modified, +2/-1)
  • ui/src/ui/chat/run-lifecycle.ts (modified, +2/-1)
  • ui/src/ui/controllers/sessions.test.ts (modified, +1/-1)
  • ui/src/ui/session-run-state.ts (added, +13/-0)
  • ui/src/ui/views/chat.test.ts (modified, +45/-0)
  • ui/src/ui/views/chat.ts (modified, +9/-4)
  • ui/src/ui/views/sessions.test.ts (modified, +50/-1)
  • ui/src/ui/views/sessions.ts (modified, +7/-3)
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

After the LLM response is fully generated and displayed, the webchat left panel remains stuck in "thinking/in progress" state and never transitions to "done".

Steps to reproduce

  1. Send a message in the webchat Control UI channel
  2. Wait for the LLM to generate and display the full response in the chat area
  3. Observe the left panel still shows "Thinking..." animation and "Calling model via HTTP API"
  4. The status never changes to "done" — it persists indefinitely

Expected behavior

After the LLM response is fully displayed, the left panel should transition from "thinking" to "done" state, and the context length indicator bar should refresh.

Actual behavior

The left panel remains stuck showing "Thinking..." with the animated spinner and "Calling model via HTTP API" text even after the response is complete. The context length indicator bar does not refresh. The status occasionally resolves on its own after a delay, or after sending a new message.

OpenClaw version

2026.5.18

Operating system

macOS 15 (Darwin 25.5.0, arm64)

Install method

npm global

Model

custom/qwen3.6-35b-a3b-8bit(mlx)

Provider / routing chain

custom local provider

Additional provider/model setup details

<img width="1166" height="513" alt="Image" src="https://github.com/user-attachments/assets/9615faae-285e-46f9-86cc-ad6aa0b2457e" />

Logs, screenshots, and evidence

Impact and severity

Affected users: Single-user webchat users Severity: Medium (does not block functionality, but creates confusion as users cannot tell if the agent is still working) Frequency: Recurring — observed multiple times in current session Consequence: Users must manually refresh the page or send another message to clear the stuck state

Additional information

Root cause analysis via frontend code inspection (control-ui/assets/index-quv2B8bV.js):

The webchat frontend uses several state variables to track turn status:

  • chatLoading: Set to true when chat request begins
  • chatRunStatus: Tracks turn phase (pending → thinking → done/interrupted)
  • chatStream: Holds the current chat stream state

Possible failure modes:

  1. Yv() state transition function is not called with outcome: 'done' after turn completion
  2. Zv() self-check function returns false because session.hasActiveRun or status data is stale
  3. WebSocket sessions.subscribe event (sessions.patch/sessions.update) is delayed or dropped
  4. chatRunId is set but never cleared by completion event

Key functions in the minified bundle:

  • Ex() — chat request handler (sets chatLoading = true)
  • Yv() — state transition function (should set chatRunStatus phase to 'done')
  • Zv() — turn completion self-check
  • Gv() — auto-clear timer (5 seconds)
  • Wv() — status clear function
  • iS() — sessions.subscribe WebSocket handler

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

After the LLM response is fully displayed, the left panel should transition from "thinking" to "done" state, and the context length indicator bar should refresh.

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 - ✅(Solved) Fix [Bug]: Webchat UI stuck in "thinking/in progress" state after LLM response completes [2 pull requests, 1 comments, 2 participants]