-
-
Notifications
You must be signed in to change notification settings - Fork 67.8k
[Bug]: Context overflow error #5771
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
Context overflow error occurs on fresh sessions with minimal workspace, even after deleting all memory databases and simplifying configuration files. The agent becomes unusable after 2-3 messages.
Steps to reproduce
- Delete all memory:
rm -rf ~/.openclaw/memory/* - Delete workspace memory files:
rm -rf ~/.openclaw/workspace/memory/* - Simplify
AGENTS.mdto ~30 lines, deleteMEMORY.md,SOUL.md,USER.md, etc. - Delete any
node_modulesfolders in workspace projects - Restart gateway:
pkill -9 -f openclaw && nohup openclaw gateway run --bind loopback --port 18789 & - Send
/newin Telegram to start fresh session - Send 2-3 short messages like "Hello" and "How are you?"
Expected behavior
A new session with minimal workspace should handle simple messages without overflow.
Actual behavior
After 2-3 messages, any subsequent message triggers:
Context overflow: prompt too large for the model. Try again with less input or a larger-context model.
The issue persists despite:
- Deleting 12MB
main.sqlitememory database - Removing all
node_modulesdirectories - Simplifying
AGENTS.mdto minimal content - Starting fresh sessions with
/new
Environment
- Clawdbot version: 2026.1.29 (a5b4d22)
- OS: Linux (Ubuntu on GCP VM)
- Install method: direct install
- Model: google/gemini-2.0-flash
- Interface: Telegram bot
Logs or screenshots
Gateway starts successfully with no errors:
[gateway] agent model: google/gemini-2.0-flash
[gateway] listening on ws://127.0.0.1:18789
[telegram] [default] starting provider (@YourBotName)
No errors appear in /tmp/openclaw.log before the overflow occurs.
Additional Notes
Workaround attempts that failed:
agents.defaults.autoCompact: true→ "Unrecognized key: autoCompact"agent.autoCompact: true→ "agent.* was moved" validation error (causes startup crash loop)
Feature requests:
- Add option to completely disable memory/RAG
- Add context size limit configuration
- Provide token count visibility for debugging
- Fix/document the correct
autoCompactconfiguration path
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.