How do you keep long sessions from eating the whole context window?
Summary
A user shares a custom Plugin SDK hook that gradually compresses older turns while keeping recent ones raw to prevent context window exhaustion in long OpenClaw sessions, reducing re-sent context by 80%.
Similar Articles
How do you deal with long-context sessions after restarting llama.cpp?
The user proposes an automatic caching mechanism for long-context sessions in llama.cpp to avoid repeated prefills after restarts, enhancing usability on slower hardware.
How I stopped context window bloat in continuous Anthropic agent loops (Opus + Sonnet architecture)
A developer shares an architectural pattern to manage context window bloat in continuous Anthropic agent loops, using KV caching, dynamic tool schema loading, and decoupling executor/advisor roles with Claude 3.5 Sonnet and Claude 3 Opus.
Don't trust large context windows
An analysis of why advertised large context windows for LLMs are misleading, as effective attention drops off around 100k tokens, and practical advice for developers to keep sessions in the 'smart zone' by using artifacts and handoffs.
What memory you're using with your Openclaw?
A developer discusses building a custom memory plugin for the Hermes agent using Engram, which reconciles new information with existing memories to avoid staleness and duplication, and asks the OpenClaw community about their memory usage.
Self-hosting with llama-server? Fix for prompt cache reloading on every turn
A troubleshooting guide showing how changing OpenClaw's contextInjection setting from 'always' to 'continuation-skip' fixes prompt cache reloading on every turn when using llama-server, resulting in a 100x speed improvement for long sessions.