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:

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.

Original post →

More from coding & agent

coding & agent channel →