You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -233,6 +234,16 @@ Sub-agents are ideal for heavy research, multi-file analysis, and exploratory ta
233
234
234
235
**Context effect:** compaction replaces accumulated conversation with a smaller synthetic state, restoring working room while discarding detail. It is lossy summarization guided by your instruction, but it cannot guarantee what survives. Future relevance is unknowable at compaction time: a debugging trace that looks like noise now may be the clue the next step needed.
235
236
237
+
In practice, the harness usually performs two reductions, not one. First it removes or offloads stale tool traces that no longer need to be replayed. Then it summarizes the surviving sections while leaving the most recent turns intact. The raw transcript may remain available outside the model call, but only the compact working set reaches the next request.
238
+
239
+
<DiagramFramekicker="Context management"title="Compaction deletes traces, then summarizes the survivors"size="full"caption={'Stale tool-call/result pairs leave the next request entirely. Surviving sections are summarized one by one, while the recent tail remains verbatim. The raw transcript may persist externally, but only the compact working set reaches the model.'}>
240
+
241
+
<CompactionLineDiagram />
242
+
243
+
</DiagramFrame>
244
+
245
+
Deletion is selection; summarization is transformation. Both reduce the model's working set, but only summarization preserves a synthetic version of the source section.
246
+
236
247
The reliable alternative is **manual handoff with external checkpointing**. Before starting a new phase, write a brief state file with the current goal, changed files, decisions, unresolved errors, and next step. Files provide exact recall; a fresh context provides inference quality.
0 commit comments