OpenClaw Hits 33K Context Limit: How to Fix It
A developer on r/openclaw reports a persistent 33K token context cap in OpenClaw, despite configuring a 262K context window. The issue affects every model they load locally, including Qwen3.8-27B, and appears to be outside OpenClaw's control.
What's Happening
The user set the context window correctly:
openclaw config set agents.defaults.contextWindow 262144OpenClaw acknowledges the model supports 262144 tokens, but responses degrade after ~33K tokens, forcing frequent /compact or /new commands on Telegram. Running ollama ps reveals the model only has a 33K context loaded, regardless of the model's native capacity.
Root Cause
The problem is likely in Ollama, not OpenClaw. Ollama defaults to a context size (often 4096 or 8192) unless overridden via the OLLAMA_CONTEXT_LENGTH environment variable or the num_ctx parameter in Modelfile. OpenClaw doesn't pass the context length to Ollama, so Ollama loads with a small window.
Solutions
- Set OLLAMA_CONTEXT_LENGTH: Before starting Ollama, set the environment variable to 262144.
export OLLAMA_CONTEXT_LENGTH=262144 - Update Modelfile: If you're using a custom model, add the parameter
and recreate the model.PARAMETER num_ctx 262144 - Check Docker: If Ollama runs in Docker, ensure the environment variable is passed via
docker run -e OLLAMA_CONTEXT_LENGTH=262144.
Additional Notes
You can verify the loaded context with ollama ps — it should show the new size after the fix. Also, consider using Ollama's OpenAI-compatible endpoint with num_ctx in the request, which some clients support.
For more details, check the source discussion.
📖 Read the full source: r/openclaw
👀 See Also

Reddit user shares prompt structure to reduce Claude Code output drift in complex tasks
A Reddit user found that using a structured prompt layout for longer Claude Code tasks helps prevent output drift. The approach involves defining specific elements like task scope, required files, success criteria, and avoidance parameters before execution.

Claude Design: 7 Tips to Avoid Burning Through Your Limits
Lock brief in regular Claude chat first, set up design system before first prompt, attach references as screenshots, link subdirectories not whole repos, use sliders for small tweaks, paste inline comments as backup, match export format to destination.

Spent $850 on OpenClaw in One Month? Fix Your Architecture, Not Your Model
A developer burned $850 in a month on OpenClaw multi-agent setup — with $350 gone in a single day. The fix wasn't a cheaper model — it was system design: strict context pruning, session resets, n8n for non-reasoning tasks, and a routing tier for cheap vs. strong models.

Practical Strategies to Avoid Claude Rate Limits on $200 Max Plan
A developer shares specific techniques that have prevented throttling on Claude's $200 max plan for over a month, including SQLite database queries, context handoff systems, and strategic hardware deployment.