Skills
Observation Masking Window (Last N Turns): Halves Agent Context Cost While Matching LLM Summarization Accuracy
JetBrains Research (NeurIPS 2025 DL4Code workshop, arXiv 2508.21433) found that discarding observations older than a fixed window is as effective as expensive LLM-based summarization for SWE-agent tasks while cutting costs by ~50% vs the raw agent. The optimal window is 10 turns based on SWE-bench Verified benchmarks across multiple frontier models including Qwen3-Coder 480B. A hybrid approach (masking + selective summarization) shaves an additional 7-11% cost beyond either method alone — and the finding extends to OpenHands, making it architecture-agnostic.
↳ Follow the thread