Context compression cut token use, but broke AI agent reliability
PepperWestern2263 · reddit · 2026-07-23
A Reddit user says context compression for AI agents reduced token usage, but also broke reliability in subtle ways.
They split context into three categories:
- Disposable context: repeated search results, duplicated docs, long file listings, verbose logs. Good candidates for filtering or summarization.
- Load-bearing context: exact error messages, file paths, line numbers, patch anchors, test names, acceptance criteria. Even small rewrites can break the next step.
- Machine-consumed context: JSON, shell output, CSV, patches, or anything parsed by another tool. This is where compression caused the most surprising failures.
The main lesson: the goal should not be the smallest possible context, but the smallest context that still preserves the evidence and interfaces needed for the next action.
The author asks how others handle this in production, and whether teams use explicit no-summarize rules or rely on retrieval.
More from coding & agent
- Building a second brain with Markdown, Git, and an AI agent — adnan_hashmi · 2026-07-23
- Meta-agent orchestration doubles pair-coding pass rate on CooperBench — shi_weiyan · 2026-07-23
- A meta-agent can rewind, fork and audit other agents mid-task — shi_weiyan · 2026-07-23
- Free local speech-to-text tools are good enough to replace prompt typing — craigsdennis · 2026-07-23
- Microsoft opens beta for a new multi-agent AI certification exam — adnan_hashmi · 2026-07-23
- LangChain maps the governance checklist teams need before agents hit production — LangChain · 2026-07-23