openclaw - 💡(How to fix) Fix Session stuck in processing state: in_progress never clears after tool calls complete

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…

The session UI shows in_progress even after all tool calls have completed. This happens consistently during conversations that involve exec and browser tool calls.

Error Message

Full log file: /tmp/openclaw/openclaw-2026-05-21.log

Key entries (timestamps in UTC+8):

  • 18:41:29 stalled session warning (age=443s)
  • 18:46:43 stalled session warning (age=757s)
  • 18:47:51 handshake timeout (durationMs=465554)
  • 18:48:24 gateway connect timeout
  • 18:48:25 stuck session recovery triggered

Root Cause

Root Cause (from gateway logs)

Code Example

stalled session: sessionId=0829a221-a12c-49cb-9a64-42c2fc1a89ea 
  state=processing age=757s queueDepth=1 
  reason=active_work_without_progress 
  classification=stalled_agent_run 
  activeWorkKind=embedded_run 
  lastProgress=model_call:ended 
  lastProgressAge=664s 
  recovery=checking

---

handshake timeout conn=c0a236c7-496c-487a-a839-7442c721e3e7 
  durationMs=290063
closed before connect code=1008 reason=connect failed

---

gateway connect failed: Error: gateway request timeout for connect
embedded abort settle timed out: runId=8e8e44d6 timeoutMs=2000
removed stale session lock (dead-pid)
stuck session recovery: aborted=true drained=false forceCleared=true
RAW_BUFFERClick to expand / collapse

Description

The session UI shows in_progress even after all tool calls have completed. This happens consistently during conversations that involve exec and browser tool calls.

Root Cause (from gateway logs)

Three issues combine:

1. Session stalls after model_call ends

stalled session: sessionId=0829a221-a12c-49cb-9a64-42c2fc1a89ea 
  state=processing age=757s queueDepth=1 
  reason=active_work_without_progress 
  classification=stalled_agent_run 
  activeWorkKind=embedded_run 
  lastProgress=model_call:ended 
  lastProgressAge=664s 
  recovery=checking

The model_call has ended but the session never transitions out of processing. It takes ~12 minutes before the stuck recovery kicks in.

2. WebSocket handshake timeout

handshake timeout conn=c0a236c7-496c-487a-a839-7442c721e3e7 
  durationMs=290063
closed before connect code=1008 reason=connect failed

The frontend-to-gateway WebSocket connection times out during handshake (~4.8 min), so the frontend never receives completion events.

3. Gateway becomes unresponsive intermittently

gateway connect failed: Error: gateway request timeout for connect
embedded abort settle timed out: runId=8e8e44d6 timeoutMs=2000
removed stale session lock (dead-pid)
stuck session recovery: aborted=true drained=false forceCleared=true

The gateway occasionally stops responding, causing session locks to become dead-pid. Recovery happens via abort_embedded_run but the UI state is already corrupted.

Reproduction

Occurs consistently on macOS (Darwin 25.5.0, arm64) during conversations that involve multiple exec tool calls with background processes. The in_progress badge never clears until the gateway restarts or the stuck recovery eventually fires.

Environment

  • OpenClaw version: 2026.5.18
  • OS: macOS Darwin 25.5.0 (arm64)
  • Model: aliyun-tokenplan/qwen3.6-plus
  • Gateway mode: local, bind=loopback, port=18789

Impact

  • UI shows in_progress indefinitely, confusing users
  • Session appears stuck even though the agent has completed its work
  • Requires manual gateway restart to recover

Logs

Full log file: /tmp/openclaw/openclaw-2026-05-21.log

Key entries (timestamps in UTC+8):

  • 18:41:29 stalled session warning (age=443s)
  • 18:46:43 stalled session warning (age=757s)
  • 18:47:51 handshake timeout (durationMs=465554)
  • 18:48:24 gateway connect timeout
  • 18:48:25 stuck session recovery triggered

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 Session stuck in processing state: in_progress never clears after tool calls complete