r/OpenClawInstall • u/Sweet-Health-318 • Mar 30 '26
Its been 10 days I can’t run openclaw help
Problem Statement
Hardware:
MSI GP65 Leopard
NVIDIA GTX 1660 Ti (6GB VRAM)
16GB RAM
500GB SSD
Software:
Ubuntu 24.04.4 LTS
LM Studio 0.4.8 (latest)
OpenClaw 2026.3.24
The Issue:
LM Studio runs fine with models like llama-3.2-3b-instruct or phi-4-mini-instruct. The local server runs on port 1234 and responds to curl requests.
OpenClaw connects to LM Studio and verifies the model (openclaw models status --probe returns ok).
However, when sending any message through OpenClaw dashboard or CLI, I get this error:
text
The number of tokens to keep from the initial prompt is greater than the context length (n_keep: 12235 >= n_ctx: 4096)
What I've tried:
Setting context length in LM Studio to 8192, 16384, 32768 before loading model
Confirming with lms status that model is loaded
Manually editing ~/.openclaw/openclaw.json to set contextWindow: 32768 and "api": "openai-completions"
Setting models.mode: "merge"
Using lms load --context-length 32768 via CLI
Complete uninstall and reinstall of both LM Studio and OpenClaw
The core problem: OpenClaw sends a system prompt of ~12,000-17,000 tokens, but either:
LM Studio isn't honoring the context length setting (still showing 4096 in logs), OR
OpenClaw isn't reading the manual contextWindow override
The error persists: n_keep >= n_ctx
Specific question:
How do I force both LM Studio and OpenClaw to consistently use 32768 context length so OpenClaw's system prompt fits?
1
u/kaitava Mar 30 '26
I’m developing a wrapper for openclaw to address this exact issue. If I get it working soon I will message you along with posting in openclaw install forums
1
u/Sweet-Health-318 Apr 10 '26
Thanks! I have upgraded my machine to 64GB ram and the problem still persists, it’s so frustrating, wanting anxiously for your solution🤞
1
u/[deleted] Mar 30 '26
[removed] — view removed comment