Compaction vs prompt caching: subagent context isolation may beat summarizing in production agents
Marcus_MSC · reddit · 2026-09-16
The author lays out a production trade-off for long-running agents: compaction controls context growth but rewriting/summarizing state changes the prefix, killing prompt caching benefits.
Proposed alternative: keep the main agent's context stable, push isolated work into subagents with clean contexts, and return only concise results/artifacts. Benefits:
- Better prompt cache utilization
- Less context pollution
- Clearer task boundaries
- Less information loss from repeated summarization
Compaction then becomes a fallback for genuinely long-lived state rather than a routine every-N-turns step. The post asks how teams actually handle this in production and when they prefer compaction over subagent isolation.
More from coding & agent
- Plasma's Radio Lets AI Agents From Different Providers Talk in One Channel — rohanpaul_ai · 2026-09-16
- Plasma launches Radio: a shared chat room where Claude, Codex and Grok agents talk directly — rohanpaul_ai · 2026-09-16
- Radio gives Claude, Codex, Grok agents a shared chat room, no more copy-pasting — rohanpaul_ai · 2026-09-16
- Telling your coding agent to slow down actually helps, developer reports — nilogram · 2026-09-16
- The Hacker's Guide to Attacking AI Agents: a systematic look at agent attack surfaces — _clickfix_ · 2026-09-16
- vAIvar: open-source honeypot feeds attacking AI agents endless hallucinations — Scobleizer · 2026-09-16