From 18e9c17ae54555dd3993072ae37207b221b2b6ef Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Thu, 4 Dec 2025 02:58:45 +0100 Subject: [PATCH] docs(coding-agent): add note that compaction should generally be avoided --- packages/coding-agent/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/coding-agent/README.md b/packages/coding-agent/README.md index 795644b4..0322d8e2 100644 --- a/packages/coding-agent/README.md +++ b/packages/coding-agent/README.md @@ -781,6 +781,8 @@ pi --session /path/to/my-session.jsonl ## Context Compaction +> **Note:** Compaction should generally be avoided as it is lossy. The agent loses access to the full session history after compaction. Try to size your tasks such that compaction will not be necessary. + Long sessions can exhaust the model's context window. Context compaction summarizes older conversation history while preserving recent messages, allowing sessions to continue indefinitely. ### How It Works