openclaw - 💡(How to fix) Fix [Bug]: Agent turn hangs ~60s with 140% CPU in bootstrap (2026.4.21), affects both gateway and --local modes on Raspberry Pi 5 [5 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#70214Fetched 2026-04-23 07:27:40
View on GitHub
Comments
5
Participants
3
Timeline
8
Reactions
0
Timeline (top)
commented ×5labeled ×2closed ×1

Summary openclaw agent hangs for ~60 seconds then gets killed by timeout on every invocation. The hang is in the agent bootstrap/initialization phase — it happens before the LLM is called and before the agent is even resolved (nonexistent agent names also hang).

Environment

  • Platform: Raspberry Pi 5, 8GB RAM, Raspberry Pi OS (64-bit)
  • Node.js: v24.14.1
  • OpenClaw: 2026.4.21 (f788c88), installed via npm install -g openclaw@latest
  • Previously on 2026.4.15; same hang (different error signature — Issue #65566-style streaming parse errors, now gone in 2026.4.21)
  • Providers configured: Anthropic, Google, OpenRouter (all valid API keys)

Error Message

  • Previously on 2026.4.15; same hang (different error signature — Issue #65566-style streaming parse errors, now gone in 2026.4.21) openclaw agent --local --message "say ok" should return within a few seconds with the model's response (or return an auth error quickly if no provider is configured).

Root Cause

Summary openclaw agent hangs for ~60 seconds then gets killed by timeout on every invocation. The hang is in the agent bootstrap/initialization phase — it happens before the LLM is called and before the agent is even resolved (nonexistent agent names also hang).

Environment

  • Platform: Raspberry Pi 5, 8GB RAM, Raspberry Pi OS (64-bit)
  • Node.js: v24.14.1
  • OpenClaw: 2026.4.21 (f788c88), installed via npm install -g openclaw@latest
  • Previously on 2026.4.15; same hang (different error signature — Issue #65566-style streaming parse errors, now gone in 2026.4.21)
  • Providers configured: Anthropic, Google, OpenRouter (all valid API keys)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Summary openclaw agent hangs for ~60 seconds then gets killed by timeout on every invocation. The hang is in the agent bootstrap/initialization phase — it happens before the LLM is called and before the agent is even resolved (nonexistent agent names also hang).

Environment

  • Platform: Raspberry Pi 5, 8GB RAM, Raspberry Pi OS (64-bit)
  • Node.js: v24.14.1
  • OpenClaw: 2026.4.21 (f788c88), installed via npm install -g openclaw@latest
  • Previously on 2026.4.15; same hang (different error signature — Issue #65566-style streaming parse errors, now gone in 2026.4.21)
  • Providers configured: Anthropic, Google, OpenRouter (all valid API keys)

Steps to reproduce

  1. Install OpenClaw 2026.4.21:
  2. Configure at least one provider (this bug reproduced with Anthropic, Google, and OpenRouter all configured — all three hang identically): or manually place API keys in ~/.openclaw/agents/main/agent/auth-profiles.json
  3. Start the gateway as a user systemd service: Wait ~45 seconds for it to initialize. Confirm with:
  4. Run any agent command. All of these hang: Gateway mode: Local (embedded) mode: Nonexistent agent (also hangs, confirming hang is in bootstrap):
  5. Each command hangs for roughly the full timeout period, consuming ~140% CPU the entire time, then exits with code 143 (SIGTERM from the timeout wrapper).

Same behavior regardless of:

  • Primary model (tested Haiku 4.5, Sonnet 4.6, Gemini 2.5 Flash)
  • Gateway mode vs --local mode
  • Agent name (even --agent nonexistent hangs ~25s before timeout)
  • Output flag (--json doesn't help)
  • Timeout value

Expected behavior

openclaw agent --local --message "say ok" should return within a few seconds with the model's response (or return an auth error quickly if no provider is configured).

Actual behavior

The --agent nonexistent-test case is particularly telling — since the agent doesn't exist, a correct implementation should fail immediately with "agent not found." Instead it hangs ~25s before being killed by timeout 30, which proves the hang happens in CLI bootstrap before agent resolution runs.

Timings across variants (for pattern-matching)

CommandReal timeUser CPUExit
openclaw agent --agent main (gateway)70.2s97.4s143
openclaw agent --local --agent main68.2s98.5s143
openclaw agent --local --agent nonexistent24.9s36.3s143
openclaw doctor60.0s58.8s143

CPU ratio (user/real) is consistently ~1.4x, indicating one fully-pegged thread is busy-looping for the entire duration of the hang.

OpenClaw version

2026.4.21 (f788c88)

Operating system

Raspberry Pi OS (64-bit) on Raspberry Pi 5, 8GB RAM, Linux kernel aarch64

Install method

npm install -g openclaw@latest

Model

anthropic/claude-haiku-4-5 (also reproduces on anthropic/claude-sonnet-4-6 and google/gemini-2.5-flash)

Provider / routing chain

Primary: anthropic/claude-haiku-4-5 Fallbacks: openrouter/meta-llama/llama-3.3-70b-instruct:free → anthropic/claude-sonnet-4-6 → google/gemini-2.5-flash

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The openclaw agent command hangs for approximately 60 seconds before being killed by a timeout, likely due to an issue in the agent bootstrap or initialization phase.

Guidance

  • The hang occurs before the LLM is called and before the agent is resolved, suggesting a problem in the early stages of the openclaw agent command.
  • The fact that the hang happens regardless of the agent name, including nonexistent agents, points to an issue in the CLI bootstrap process rather than in the agent resolution or LLM invocation.
  • The consistent CPU ratio of ~1.4x, indicating a fully-pegged thread, suggests a busy-loop or similar issue in the code.
  • To mitigate the issue, try checking the OpenClaw configuration files, such as ~/.openclaw/agents/main/agent/auth-profiles.json, for any potential errors or misconfigurations.

Example

No specific code example can be provided without more information about the OpenClaw codebase, but checking the configuration files and the bootstrap process for any potential issues or bottlenecks may help resolve the problem.

Notes

The issue seems to be related to the OpenClaw version 2026.4.21, and it may be worth trying to reproduce the issue with a previous version to see if it's a regression. Additionally, the fact that the hang occurs on different models and providers suggests a more fundamental issue in the OpenClaw code.

Recommendation

Apply a workaround by checking and correcting the OpenClaw configuration files and investigating the bootstrap process for potential issues, as the root cause of the problem is likely related to the initialization phase of the openclaw agent command.

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

openclaw agent --local --message "say ok" should return within a few seconds with the model's response (or return an auth error quickly if no provider is configured).

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]: Agent turn hangs ~60s with 140% CPU in bootstrap (2026.4.21), affects both gateway and --local modes on Raspberry Pi 5 [5 comments, 3 participants]