Context Length Exceeded
Error: context_length_exceeded / maximum context length exceeded / token limit reached
OpenClaw troubleshooting · Updated 2026
Error Message
Error: context_length_exceeded / maximum context length exceeded / token limit reached
What Causes This
Your conversation (system prompt + history + current message) exceeds the model's context window. Standard Claude models support 200K tokens; 1M is available in beta. Long conversations, large file reads, or many enabled skills inflate context quickly.
How to Fix It
Compact or reset the conversation:
# In chat — compact the context (summarize and free tokens)
/compact
# Start a fresh session
/new
# Check what's consuming context
/context detail
Prevention: enable fewer skills (each skill adds to the system prompt on every call), keep SOUL.md and AGENTS.md concise (50-150 lines each), set session.reset.mode: "daily" to auto-reset at a quiet hour, and configure session.reset.idleMinutes: 120 to reset after 2 hours of inactivity.