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
Copy file name to clipboardExpand all lines: advanced/context-pruning.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ As agents run long tasks, tool results accumulate in the conversation history. L
11
11
1.**Soft trim** — truncate oversized tool results to head + tail, dropping the middle.
12
12
2.**Hard clear** — if the context is still too full, replace entire tool results with a short placeholder.
13
13
14
-
Context pruning is distinct from [session compaction](../core-concepts/sessions-and-history.md). Compaction permanently summarizes and truncates conversation history. Pruning is non-destructive: the original tool results remain in the session store and are never modified — only the message slice sent to the LLM is trimmed.
14
+
Context pruning is distinct from [session compaction](#sessions-and-history). Compaction permanently summarizes and truncates conversation history. Pruning is non-destructive: the original tool results remain in the session store and are never modified — only the message slice sent to the LLM is trimmed.
15
15
16
16
---
17
17
@@ -210,12 +210,14 @@ Increase `softTrim.headChars` and `softTrim.tailChars`, or raise `softTrim.maxCh
210
210
211
211
**Context still overflows despite pruning**
212
212
213
-
Pruning only acts on tool results. If long user messages or system prompt components dominate the context, pruning will not help. Consider [session compaction](../core-concepts/sessions-and-history.md) or reduce the system prompt size.
213
+
Pruning only acts on tool results. If long user messages or system prompt components dominate the context, pruning will not help. Consider [session compaction](#sessions-and-history) or reduce the system prompt size.
214
214
215
215
---
216
216
217
217
## What's Next
218
218
219
-
-[Sessions & History](../core-concepts/sessions-and-history.md) — session compaction, history limits
220
-
-[Memory System](../core-concepts/memory-system.md) — persistent memory across sessions
221
-
-[Configuration Reference](../reference/config-reference.md) — full agent config reference
219
+
-[Sessions & History](#sessions-and-history) — session compaction, history limits
220
+
-[Memory System](#memory-system) — persistent memory across sessions
221
+
-[Configuration Reference](#config-reference) — full agent config reference
0 commit comments