r/openclaw • u/Gold-Drag9242 Active • 5d ago
Discussion Context Compression takes really long
I notice that context compression is a very common factor right before a session ends without a result. I already incresed the timeouts, but it still happens (less frequently of course).
Do you have any tuning tips on how to speed up the compression?
We are talking 100k - 180k tokens. (np2 vs np1)
3
Upvotes
1
u/Ok-Form1598 New User 5d ago
timeoutSeconds resets on every streamed token, so raising it only helps when the request goes quiet. two other settings under agents.defaults.compaction do more for speed.
modelpoints just the summarizing at something small and fast while the session keeps its main model, andthinkingLevelset to off or minimal stops it spending the run reasoning about how to summarize. if you're on safeguard mode, the quality guard can also run a corrective retry, so one slow compaction is sometimes two.1
u/Obagam 17h ago
I just had chat gpt advise me on optimal settings based on local llm model, system specs etc. I’m currently using oMLX with splash and swift 1.5 qwen 3.8 27b on a MacBook Pro M4 Pro with 24gb ram. I’m also on 262k context window with 32k max output tokens. I had it integrate chat gpt’s suggested settings into openclaw.json. I’ve went all day without a single time out, context overflow or compaction/new session message. It’s been a complete game changer for me.