openclaw - 💡(How to fix) Fix [Bug]: OpenClaw 的 load-time maintenance 有一个 bug — 它调用 resolveMaintenanceConfigFromInput() 时没传参数,直接用了硬编码默认值 500,完全忽略了配置文件。 [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#71356Fetched 2026-04-26 05:13:35
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
commented ×2cross-referenced ×2closed ×1labeled ×1

OpenClaw 的 load-time maintenance 有一个 bug — 它调用 resolveMaintenanceConfigFromInput() 时没传参数,直接用了硬编码默认值 500,完全忽略了配置文件。

store-load-HmCzUIz7.js 第 13 行硬编码了 DEFAULT_SESSION_MAX_ENTRIES = 500,load 路径没读配置,直接用的这个默认值。每次新 session 加载时触发 501 > 500 → 裁回 500 → 循环。

Root Cause

OpenClaw 的 load-time maintenance 有一个 bug — 它调用 resolveMaintenanceConfigFromInput() 时没传参数,直接用了硬编码默认值 500,完全忽略了配置文件。

store-load-HmCzUIz7.js 第 13 行硬编码了 DEFAULT_SESSION_MAX_ENTRIES = 500,load 路径没读配置,直接用的这个默认值。每次新 session 加载时触发 501 > 500 → 裁回 500 → 循环。

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

OpenClaw 的 load-time maintenance 有一个 bug — 它调用 resolveMaintenanceConfigFromInput() 时没传参数,直接用了硬编码默认值 500,完全忽略了配置文件。

store-load-HmCzUIz7.js 第 13 行硬编码了 DEFAULT_SESSION_MAX_ENTRIES = 500,load 路径没读配置,直接用的这个默认值。每次新 session 加载时触发 501 > 500 → 裁回 500 → 循环。

Steps to reproduce

session 超过 500 后,不断被清空

Expected behavior

observed behavior

Actual behavior

observed behavior

OpenClaw version

2026.4.22

Operating system

mac os

Install method

No response

Model

any

Provider / routing chain

no

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 issue can be fixed by passing the correct configuration parameter to resolveMaintenanceConfigFromInput() instead of using the hardcoded default value of 500.

Guidance

  • Review the store-load-HmCzUIz7.js file and modify the DEFAULT_SESSION_MAX_ENTRIES value to be dynamically loaded from the configuration file instead of being hardcoded.
  • Verify that the configuration file is being read correctly and the value is being passed to resolveMaintenanceConfigFromInput().
  • Check the session loading logic to ensure that it is not triggering a loop when the session count exceeds the maximum allowed value.
  • Consider adding error handling or logging to detect and prevent similar issues in the future.

Example

// Before
const DEFAULT_SESSION_MAX_ENTRIES = 500;

// After
const config = loadConfigFromFile();
const DEFAULT_SESSION_MAX_ENTRIES = config.sessionMaxEntries;

Notes

The fix assumes that the configuration file contains the correct value for sessionMaxEntries. If the configuration file is not being read correctly, additional debugging may be required.

Recommendation

Apply workaround: Modify the store-load-HmCzUIz7.js file to load the configuration value dynamically, as this will fix the immediate issue and prevent similar problems in the future.

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

observed behavior

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING