openclaw - 💡(How to fix) Fix [Bug]: OpenClaw Bug Report: Stuck Session CPU Regression in v2026.4.29 [2 comments, 3 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#75516Fetched 2026-05-02 05:33:37
View on GitHub
Comments
2
Participants
3
Timeline
8
Reactions
2
Timeline (top)
commented ×2cross-referenced ×2closed ×1labeled ×1

After updating to OpenClaw v2026.4.29, the gateway process consumes 47-100% CPU continuously, causing severe event loop delays (up to 22 seconds) and breaking Discord integration.

Root Cause

Root Cause Identified

Stuck session detection/recovery loop spam:

Fix Action

Fix / Workaround

Workarounds Attempted

  1. ✅ Cleared session lock files
  2. ✅ Gateway restart
  3. ✅ Session directory cleanup
  4. ✅ Downgrade to v2026.4.14 (confirmed working)

Code Example

## Log Snippets

liveness warning: reasons=event_loop_delay interval=32s 
  eventLoopDelayP99Ms=16458.4 eventLoopUtilization=1 cpuCoreRatio=1.034

fetch timeout reached; aborting operation
  url=https://discord.com/api/v10/users/@me elapsedMs=20872

---

stuck session: sessionId=main sessionKey=agent:main:discord:channel:[MASKED]
  state=processing age=123s queueDepth=1 reason=processing_with_queued_work recovery=checking

stuck session recovery skipped: reason=active_embedded_run action=observe_only 
  sessionId=main age=153s queueDepth=1 activeSessionId=[MASKED]
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

After updating to OpenClaw v2026.4.29, the gateway process consumes 47-100% CPU continuously, causing severe event loop delays (up to 22 seconds) and breaking Discord integration.

Steps to reproduce

  1. Update to OpenClaw v2026.4.29
  2. Have Discord channel sessions active
  3. Observe CPU spike and stuck session warnings in logs
  4. Discord inbound stops working

Expected behavior

  • CPU usage: <10% idle
  • Event loop delay: <100ms
  • Discord: Messages work bidirectionally
  • Sessions: Clean up properly after processing

Actual behavior

  • CPU: 47-100% continuous
  • Event loop: 2-22 second delays
  • Discord: Outbound works, inbound broken (timeouts)
  • Sessions: Stuck in processing state, diagnostic loop spam

OpenClaw version

2026.4.29

Operating system

Ubuntu (VirtualBox VM)

Install method

No response

Model

.

Provider / routing chain

.

Additional provider/model setup details

No response

Logs, screenshots, and evidence

## Log Snippets

liveness warning: reasons=event_loop_delay interval=32s 
  eventLoopDelayP99Ms=16458.4 eventLoopUtilization=1 cpuCoreRatio=1.034

fetch timeout reached; aborting operation
  url=https://discord.com/api/v10/users/@me elapsedMs=20872

Impact and severity

High - Breaks Discord integration, renders system unusable on limited resources.

Additional information

Environment

  • Version: 2026.4.29 (d11e02136d2b)
  • OS: Ubuntu (VirtualBox VM)
  • CPU: 3 cores
  • RAM: 5.4 GB
  • Node: v22.22.2

Regression Confirmation

  • Previous version: Worked fine before 2026.4.29
  • Discord worked: Yes, before update
  • CPU usage: Normal before update

Symptoms

  1. High CPU: 47-100% continuous usage by openclaw process
  2. Event loop delays: 2-22 seconds (should be <100ms)
  3. Discord broken: Inbound messages don't work, API calls timeout after 20+ seconds
  4. Slow responses: All API calls 10-100x slower than normal

Root Cause Identified

Stuck session detection/recovery loop spam:

stuck session: sessionId=main sessionKey=agent:main:discord:channel:[MASKED]
  state=processing age=123s queueDepth=1 reason=processing_with_queued_work recovery=checking

stuck session recovery skipped: reason=active_embedded_run action=observe_only 
  sessionId=main age=153s queueDepth=1 activeSessionId=[MASKED]

This repeats every 30 seconds, consuming CPU cycles and filling logs.

Technical Details

  • Session stuck in processing state for 200+ seconds
  • Diagnostic system continuously polls stuck sessions
  • File lock held: [MASKED_SESSION].jsonl.lock
  • 17 threads active (reasonable, not a leak)
  • 303 session files in directory (782MB total)

Thread Breakdown

  • 6x tokio-runtime-w (Rust/WASM workers)
  • 5x node (Node.js threads)
  • 4x libuv-worker
  • 1x DelayedTaskScheduler
  • 1x openclaw main

Affected Channel

  • Discord channel (debug-yourself) — IDs masked for privacy

Workarounds Attempted

  1. ✅ Cleared session lock files
  2. ✅ Gateway restart
  3. ✅ Session directory cleanup
  4. ✅ Downgrade to v2026.4.14 (confirmed working)

Related Issues

  • Discord Gateway timeout: fetch timeout reached; aborting operation (20s)
  • API calls timing out: sessions.list taking 6+ seconds

extent analysis

TL;DR

Downgrade to OpenClaw v2026.4.14 to immediately resolve the high CPU usage and Discord integration issues until a fix for v2026.4.29 is available.

Guidance

  • Verify the issue: Confirm that the problem started after updating to OpenClaw v2026.4.29 and that downgrading to v2026.4.14 resolves the issue.
  • Monitor session states: Keep an eye on session states, especially those stuck in the processing state, as they seem to trigger the diagnostic system's continuous polling, contributing to high CPU usage.
  • Clean up session files: Regularly clean up session files, especially if the number of files grows significantly, to prevent potential performance issues.
  • Watch for updates: Wait for an update to OpenClaw that addresses the stuck session detection/recovery loop issue, as downgrading might not be a long-term solution.

Example

No specific code example is provided due to the nature of the issue, which seems to be related to the OpenClaw version and its internal handling of sessions and diagnostics.

Notes

The root cause seems to be related to a stuck session detection/recovery loop that spams the logs and consumes CPU cycles. This issue is specific to OpenClaw v2026.4.29, and downgrading to v2026.4.14 has been confirmed to work.

Recommendation

Apply the workaround by downgrading to OpenClaw v2026.4.14. This version has been confirmed to resolve the high CPU usage and Discord integration issues, providing a temporary solution until a fix for v2026.4.29 is released.

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

  • CPU usage: <10% idle
  • Event loop delay: <100ms
  • Discord: Messages work bidirectionally
  • Sessions: Clean up properly after processing

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]: OpenClaw Bug Report: Stuck Session CPU Regression in v2026.4.29 [2 comments, 3 participants]