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
Anyone else finding long running OpenClaw workflows harder to supervise?
The author describes challenges in supervising multiple long-running OpenClaw workflows, noting that workflow organization became harder than setup as usage scales.
@rwayne: Context Mode solves the other half of AI Agent context issues: sandboxed tool outputs + persistent sessions. A 56 KB Playwright snapshot compressed to 299 bytes, 98% of data never entering the context. Every file edit, Git operation, task decision is stored into…
Context Mode is a tool that solves AI agent context problems by sandboxing tool outputs and persisting sessions, achieving up to 98% compression of Playwright snapshots and using BM25 retrieval to reduce context window usage. It supports 15 platforms including Claude Code, Gemini CLI, VS Code Copilot, and is used by major tech companies.
What actually happens to your context window after 6 hours of continuous agent runtime
A practitioner shares real-world failure modes of context window management strategies (summarization, RAG, truncation) in AI agents running continuously for 6+ hours, noting that each method degrades decision quality in ways that only become apparent at extended runtime.
@ickma2311: Efficient AI Lecture 15: Long-Context LLM Long context is not just a bigger prompt window. The key question is: which p…
This post summarizes Efficient AI Lecture 15 on long-context LLMs, covering RoPE position interpolation for context extension, the needle-in-haystack evaluation, and StreamingLLM's attention sink phenomenon and KV cache eviction strategy.
Your OpenClaw agent probably shouldn't be polling for everything
This article discusses the inefficiency of polling in OpenClaw agents and introduces a plugin that moves event detection outside the agent loop, resulting in significant reductions in source calls and token usage.