openclaw - 💡(How to fix) Fix Bug: Context limit exceeded error persists after modifying config and restarting service [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#72106Fetched 2026-04-27 05:34:46
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
closed ×1commented ×1cross-referenced ×1

Error Message

After modifying the configuration file and restarting the OpenClaw service, the following error still occurs: 3. The error persists despite the configuration change The configuration change should be respected and the error should no longer appear after restarting the service. The issue suggests setting agents.defaults.compaction.reserveTokensFloor to 20000 or higher, but even after making this change in the config file and restarting the service, the error continues to occur.

Code Example

⚠️ Context limit exceeded. I have reset our conversation to start fresh - please try again.
To prevent this, increase your compaction buffer by setting agents.defaults.compaction.reserveTokensFloor to 20000 or higher in your config.

---

agents:
  defaults:
    compaction:
      reserveTokensFloor: 20000
RAW_BUFFERClick to expand / collapse

Bug Description

After modifying the configuration file and restarting the OpenClaw service, the following error still occurs:

⚠️ Context limit exceeded. I have reset our conversation to start fresh - please try again.
To prevent this, increase your compaction buffer by setting agents.defaults.compaction.reserveTokensFloor to 20000 or higher in your config.

Steps to Reproduce

  1. Modify the configuration file (e.g., set agents.defaults.compaction.reserveTokensFloor)
  2. Restart the OpenClaw service
  3. The error persists despite the configuration change

Expected Behavior

The configuration change should be respected and the error should no longer appear after restarting the service.

Screenshots

<img width="1030" height="372" alt="Image" src="https://github.com/user-attachments/assets/b02a5126-71a1-4a83-b7af-5fbf7e6d81cf" /> <img width="1032" height="75" alt="Image" src="https://github.com/user-attachments/assets/fcc2d3e3-8d93-4737-a4fe-390f641600cd" />

Environment

  • OpenClaw version: latest
  • OS: Debian 13
  • Node.js version: 22+

Relevant Configuration

agents:
  defaults:
    compaction:
      reserveTokensFloor: 20000

Additional Context

The issue suggests setting agents.defaults.compaction.reserveTokensFloor to 20000 or higher, but even after making this change in the config file and restarting the service, the error continues to occur.


Reported by: XuXuClassMate

extent analysis

TL;DR

Increase the reserveTokensFloor value beyond 20000 in the configuration file and restart the OpenClaw service to potentially resolve the "Context limit exceeded" error.

Guidance

  • Verify that the configuration file is being read correctly by the OpenClaw service after modifications, ensuring that the changes are actually applied.
  • Check for any other configuration files or environment variables that might be overriding the agents.defaults.compaction.reserveTokensFloor setting.
  • Consider increasing the reserveTokensFloor value significantly higher than 20000 to accommodate the specific requirements of your application and prevent the error from recurring.
  • Review the OpenClaw documentation for any specific guidelines on configuring the compaction buffer and its relationship with the "Context limit exceeded" error.

Example

No specific code example is provided as the issue revolves around configuration rather than code implementation.

Notes

The effectiveness of increasing reserveTokensFloor depends on the specific demands of the application and the resources available. It's also unclear if there are other factors contributing to the "Context limit exceeded" error beyond the compaction buffer size.

Recommendation

Apply workaround: Increase the reserveTokensFloor value and restart the service, as this directly addresses the error message's suggestion and may resolve the issue without requiring a version upgrade, which is not explicitly implied as a solution in 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 Bug: Context limit exceeded error persists after modifying config and restarting service [1 comments, 2 participants]