Context compaction is how a coding-agent harness makes room in a growing conversation, often by summarizing or otherwise reducing earlier material. Automatic compaction and user control are separate features: a harness may compact on its own while still letting you turn that behavior off or start compaction manually. The headline’s counts—15 of 20 harnesses compact automatically and 10 let users set when—are not verified by the available product-by-product evidence.
What context compaction does
A coding-agent harness is the runtime around a model: it connects the model to tools and the outside world, and manages context, safety controls, orchestration, and extensions. That means compaction is a harness behavior, not simply a property of a model’s advertised context-window size. As a conversation grows, the harness may need to reduce what it sends forward so there is room for new instructions, tool results, and responses. A 2026 study of production coding harnesses describes these systems as combinations of models and runtime capabilities, rather than models alone (study of production coding harnesses).
As an Amazon Associate I earn from qualifying purchases.
“Automatic” describes who or what initiates the operation; it does not, by itself, tell you what information survives. A summary can replace earlier messages, a harness can preserve recent turns while summarizing older ones, or a system can keep an event log and present a reduced view to the model. Those choices affect what the agent can refer to later and whether earlier events remain recoverable.
Recommended Free Tools
Separate the trigger from the user controls
When evaluating a harness, look for four distinct properties rather than treating “automatic compaction” as a complete feature description:
#1 Best Overall
- Trigger: Does compaction begin at a context threshold, after a particular event, on the agent’s initiative, or only when a person issues a command?
- User control: Can you invoke it manually, disable automatic behavior, or adjust its trigger?
- Retained information: Does the system keep the full history, a summary and recent turns, selected tool output, or another representation?
- Recoverability and configuration: Are original events preserved or replayable, and do defaults vary by version, model, or local settings?
These questions matter independently. A manual command does not prove that automatic compaction can be tuned, and an opt-out setting does not mean the user can choose an exact threshold.
VS Code illustrates the difference
Visual Studio Code’s session documentation describes three separate controls: the editor compacts automatically when the context window fills, automatic compaction can be disabled with a setting, and a user can run /compact manually with optional instructions about what the summary should retain. This is a concrete example of automatic behavior coexisting with user control; it should not be taken as evidence for any overall count across 20 harnesses. See the VS Code session-management documentation for the documented behavior.
Rank #2
What a seven-agent comparison reports
A secondary comparison updated October 2, 2026 discusses Codex CLI, Claude Code, Gemini CLI, OpenCode, Roo Code, Pi, and OpenHands. It characterizes six as using LLM summarization that replaces older messages, while describing OpenHands as keeping an append-only event log with suppression markers and computed views. In that account, the latter approach leaves history available for replay. This is one author’s characterization of seven systems, not a verified survey of all coding harnesses.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The same comparison reports approximate trigger behavior, but the values are not directly comparable: context-window formulas, output reservations, buffers, and event-based triggers differ. Its figures are reports from that secondary source, not independently verified vendor defaults:
| Harness | Trigger reported by the comparison | Qualification |
|---|---|---|
| Gemini CLI | About 50% | Reported as an adjustable default; the comparison also describes a summarize-and-verify flow and retaining 30% of the conversation tail verbatim. |
| Roo Code | About 86–92% | Reported using a context-window formula that reserves output tokens. |
| Claude Code | About 89% | Reported as based on context capacity less a reserved output allowance and buffer. |
| Codex CLI | About 90% | Reported as configurable downward only. |
| Pi | About 92% | Approximate threshold reported by the comparison. |
| OpenCode | About 96–99% | The comparison also reports that tool output may be pruned before full summarization and that automatic compaction can be disabled with an environment variable. |
| OpenHands | Event-based: at 100 events or agent-triggered | Reported as event-based rather than a comparable context-percentage threshold. |
All entries above describe what the comparison reports; the percentages should not be read as universal or current settings for every release or configuration. For details and its stated methodology, consult the seven-agent compaction comparison.
Why the 15-of-20 and 10-of-20 counts remain unsettled
Other available comparisons support the narrower conclusion that automatic summarization appears in multiple coding tools. One feature comparison covers Codex CLI, Claude Code, Gemini CLI, and Cursor, while a broad harness feature matrix advises readers to compare dimensions relevant to their needs. Neither establishes the headline’s denominator or totals. The feature comparison and harness feature matrix therefore provide context, not proof that exactly 15 of 20 compact automatically or exactly 10 let users choose when.
Rank #4
To substantiate those counts, a comparison would need to identify all 20 harnesses, specify the version and date checked for each, define “automatic” and “let you set when,” and cite evidence for every product. Without that product-level record, the counts should be treated as unverified rather than as a measured result.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →How to choose a harness for your workflow
If you are comparing tools, check their current documentation and settings for the behavior you need instead of relying on a single compact/not-compact label:
Best Value
- Identify the trigger. Find out whether compaction happens at a token or context threshold, in response to events, or only after a manual command.
- Check how much control you have. Confirm separately whether you can start compaction, turn automatic compaction off, or tune its threshold. Do not assume one control implies the others.
- Find out what is retained. Look for documentation on summaries, recent turns, tool results, and any preservation of original conversation events.
- Verify the applicable configuration. Check the selected model, release, and local settings; a reported percentage may use a formula that reserves space for output or other purposes.
For work where past decisions or tool output must remain auditable, recoverability deserves particular attention. A summary-and-replace design and an event-log design can present the model with less context in different ways; only the latter was described in the cited seven-agent comparison as leaving history available for replay.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




