From 3d66d2561d940a4a3b79d27ddf48a867af04262d Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Thu, 4 Dec 2025 02:59:55 +0100 Subject: [PATCH] docs(coding-agent): expand compaction note with manual summary alternative --- packages/coding-agent/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/coding-agent/README.md b/packages/coding-agent/README.md index 0322d8e2..7699dc9e 100644 --- a/packages/coding-agent/README.md +++ b/packages/coding-agent/README.md @@ -781,7 +781,7 @@ 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. +> **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. Alternatively, watch the context usage in the footer. When it approaches 85-90%, ask the agent to write a summary of what's been done to a markdown file, then start a new session and load that file into the context. Long sessions can exhaust the model's context window. Context compaction summarizes older conversation history while preserving recent messages, allowing sessions to continue indefinitely.