openclaw - 💡(How to fix) Fix Session history blocks startup for ~20 minutes on fresh install [2 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#70050Fetched 2026-04-23 07:29:57
View on GitHub
Comments
2
Participants
2
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
commented ×2mentioned ×1subscribed ×1
RAW_BUFFERClick to expand / collapse

Problem

After updating to 2026.4.21 (from 2026.4.15), gateway startup takes approximately 20 minutes to become fully operational. During this time:

  1. chat.history fails to load — it waits until other initialization tasks complete
  2. Only after everything else finishes does chat.history load successfully
  3. No messages are lost, but startup is severely delayed

Environment

  • OS: Windows_NT 10.0.19045
  • Node: v25.6.0
  • OpenClaw: 2026.4.21
  • Setup: Local loopback gateway, QQ channel

Suspected Cause

The new session maintenance policy introduced in 4.20 (PR #69404 — entry cap + age prune + oversized store pruning at load time) may be causing the session store to block during startup. The chat.history module attempts to read before the store is fully ready, gets stuck, and waits for the prune/compact process to complete before proceeding.

Expected Behavior

Gateway should start and be responsive within seconds, not 20 minutes.

Questions

  • Is there a way to defer or disable the startup prune for debugging purposes?
  • Should session history loading be explicitly sequenced after store initialization completes?

extent analysis

TL;DR

Deferring or disabling the startup prune process may help resolve the delayed gateway startup issue.

Guidance

  • Investigate the session maintenance policy introduced in version 4.20 (PR #69404) and its impact on the session store during startup.
  • Consider deferring or disabling the startup prune process for debugging purposes to determine if it's the root cause of the delay.
  • Review the sequencing of session history loading and store initialization to ensure that chat.history is not attempting to read from the store before it's fully ready.
  • Verify that the issue is specific to the local loopback gateway setup or if it's also present in other environments.

Example

No code snippet is provided as the issue does not contain sufficient information to create a specific example.

Notes

The issue may be specific to the combination of OpenClaw version 2026.4.21 and the local loopback gateway setup. Further testing and debugging are needed to confirm the root cause and determine the best solution.

Recommendation

Apply workaround: Defer or disable the startup prune process to see if it resolves the issue, as this is the most likely cause based on the provided information.

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 history blocks startup for ~20 minutes on fresh install [2 comments, 2 participants]