openclaw - 💡(How to fix) Fix compactionAttempts=0 prevents auto-compaction from starting [1 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#77738Fetched 2026-05-06 06:22:12
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Timeline (top)
commented ×1cross-referenced ×1

Root Cause

Impact: Context overflow events are unrecoverable because compaction never fires. Session becomes permanently stuck.

Fix Action

Fix / Workaround

Workaround: Set compactionAttempts to a value > 0, but this is not documented and the field name suggests 0 might be a valid disabled value — which it isn't in practice.

RAW_BUFFERClick to expand / collapse

When compactionAttempts is set to 0 (the default in some configurations), the auto-compaction system silently fails to initialize — no log entry, no fallback, no user notification.

Impact: Context overflow events are unrecoverable because compaction never fires. Session becomes permanently stuck.

Environment:

  • OpenClaw 2026.5.3

Expected behavior: Even with compactionAttempts=0 (disabled), the system should log a warning and surface the failure to the user.

Workaround: Set compactionAttempts to a value > 0, but this is not documented and the field name suggests 0 might be a valid disabled value — which it isn't in practice.

extent analysis

TL;DR

Set compactionAttempts to a value greater than 0 to enable auto-compaction and prevent context overflow events.

Guidance

  • Verify the current value of compactionAttempts in your configuration to ensure it is not set to 0.
  • Update the configuration to set compactionAttempts to a value greater than 0, such as 1 or a higher number, to enable auto-compaction.
  • Be aware that the field name compactionAttempts suggests 0 might be a valid disabled value, but in practice, it is not.
  • Consider documenting this workaround to avoid similar issues in the future.

Notes

The provided workaround may not be suitable for all environments or configurations, and further testing may be necessary to ensure the desired behavior.

Recommendation

Apply workaround: Set compactionAttempts to a value greater than 0, as this is the only known solution to prevent context overflow events and ensure auto-compaction initializes correctly.

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 compactionAttempts=0 prevents auto-compaction from starting [1 comments, 2 participants]