---
title: "Automatic context compaction"
canonical: "https://canmyagentuse.com/features/automatic-context-compaction"
contentKind: "feature"
locale: "en"
description: "Continue a long-running session by summarizing, pruning, or otherwise compacting older context."
llmSummary: "Automatic context compaction lets a harness reduce older context to continue a run; it must be distinguished from silent truncation and from user-triggered compaction."
publishedAt: "2026-08-28T00:00:00.000Z"
updatedAt: "2026-08-28T00:00:00.000Z"
verifiedAt: "2026-08-28"
tags: ["context","compaction","summarization","runtime"]
---

# Automatic context compaction

Automatic context compaction lets a harness reduce older context to continue a run; it must be distinguished from silent truncation and from user-triggered compaction.

- HTML: https://canmyagentuse.com/features/automatic-context-compaction
- JSON: https://canmyagentuse.com/api/v1/features/automatic-context-compaction.json
- Markdown: https://canmyagentuse.com/features/automatic-context-compaction.md

Terminology basis: **Common product term** — https://code.claude.com/docs/en/costs.

## Current support at a glance

Automatic context compaction: 5 supported, 0 partial, 0 unsupported, 26 unreviewed across 31 cataloged products.

- Reviewed current products: 5 of 31
- Supported: 5
- Partial: 0
- Unsupported: 0
- Unreviewed: 26
- Not applicable: 0

Unknown or unreviewed means insufficient published evidence; it does not mean unsupported.

This row requires a documented mechanism that summarizes, prunes, or otherwise reduces earlier context so work can continue. Silent truncation without a continuity mechanism is not compaction.

Evidence should record the trigger, whether the operator is warned, what state is preserved, whether instructions and tool results are treated specially, and whether the compacted summary is inspectable. Reliability tests should probe commitments, file paths, pending tasks, citations, approvals, and negative constraints across the boundary.

## Catalog context

- Category: [models-context](/categories/models-context.md)
- Terminology basis: Common product term
- Aliases: context summarization, auto compact, conversation compression
- Family: [Models and context](/features/models-and-context.md)
- Siblings: [Context compaction controls](/features/context-compaction-controls.md), [Context usage](/features/context-usage-visibility.md), [Context window](/features/context-window.md), [Local models](/features/local-models.md), [Model fallback](/features/model-fallback.md), [Model selection](/features/model-selection.md), [Output token limit](/features/output-token-limit.md), [Prompt cache controls](/features/prompt-cache-controls.md), [Prompt cache telemetry](/features/prompt-cache-telemetry.md), [Prompt caching](/features/prompt-cache-reuse.md), [Reasoning effort controls](/features/reasoning-effort-controls.md)

## Compatibility assertions

Unknown means insufficient published evidence; it does not mean unsupported.

### ChatGPT (web)

- Harness: [ChatGPT](/harnesses/chatgpt-web.md)
- current: **Unknown**
- preview: **Unknown**

### Claude (web)

- Harness: [Claude](/harnesses/claude-web.md)
- current: **Unknown**
- preview: **Unknown**

### Gemini (web)

- Harness: [Gemini](/harnesses/gemini-web.md)
- current: **Unknown**
- preview: **Unknown**

### Copilot (web)

- Harness: [Copilot](/harnesses/copilot-web.md)
- current: **Unknown**
- preview: **Unknown**

### Grok (web)

- Harness: [Grok](/harnesses/grok-web.md)
- current: **Unknown**
- preview: **Unknown**

### Grok Bot (desktop)

- Harness: [Grok Bot](/harnesses/grok-bot-desktop.md)
- current: **Unknown**

### Perplexity (web)

- Harness: [Perplexity](/harnesses/perplexity-web.md)
- current: **Unknown**
- preview: **Unknown**

### Le Chat (web)

- Harness: [Le Chat](/harnesses/le-chat.md)
- current: **Unknown**
- preview: **Unknown**

### Devin (web)

- Harness: [Devin](/harnesses/devin-web.md)
- current: **Unknown**
- preview: **Unknown**

### Replit Agent (web)

- Harness: [Replit Agent](/harnesses/replit-agent.md)
- current: **Unknown**
- preview: **Unknown**

### ChatGPT (desktop)

- Harness: [ChatGPT](/harnesses/chatgpt-desktop.md)
- current: **Unknown**
- preview: **Unknown**

### Claude (desktop)

- Harness: [Claude](/harnesses/claude-desktop.md)
- current: **Unknown**
- preview: **Unknown**

### Cursor (desktop)

- Harness: [Cursor](/harnesses/cursor.md)
- current: **Supported**
  - Target: dated-documentation — current Cursor chat-summarization documentation; observed 2026-08-28
  - Environment: local-default
  - Constraint (runtime): Cursor summarizes older messages as chats exceed the model context window and separately condenses oversized files and folders
  - Evidence: [Cursor — Summarization](https://docs.cursor.com/en/agent/chat/summarization) — documented; observed 2026-08-28
  - Qualification note 5: Evidence checked 2026-08-28: Cursor documents automatic summarization of older messages when a conversation exceeds the selected model's context window.
- preview: **Unknown**

### OpenWork Desktop (desktop)

- Harness: [OpenWork Desktop](/harnesses/openwork-desktop.md)
- current: **Unknown**

### Copilot Chat (desktop)

- Harness: [Copilot Chat](/harnesses/vscode-copilot.md)
- current: **Supported**
  - Target: dated-documentation — current VS Code agent-session documentation; observed 2026-08-28
  - Environment: local-default
  - Constraint (policy): automatic compaction occurs when context fills and can be disabled with github.copilot.chat.summarizeAgentConversationHistory.enabled
  - Evidence: [Microsoft — Manage agent sessions in VS Code](https://code.visualstudio.com/docs/agents/run/sessions/manage-sessions) — documented; observed 2026-08-28
  - Qualification note 4: Evidence checked 2026-08-28: VS Code documents automatic conversation-history compaction when the context window fills.
- preview: **Unknown**

### Chrome WebMCP origin trial (desktop)

- Harness: [Chrome WebMCP origin trial](/harnesses/chrome-webmcp-preview.md)
- current: **Unknown**

### Windsurf (desktop)

- Harness: [Windsurf](/harnesses/windsurf.md)
- current: **Unknown**
- preview: **Unknown**

### Zed Agent (desktop)

- Harness: [Zed Agent](/harnesses/zed-agent.md)
- current: **Unknown**
- preview: **Unknown**

### Continue (desktop)

- Harness: [Continue](/harnesses/continue.md)
- current: **Unknown**
- preview: **Unknown**

### Cline (desktop)

- Harness: [Cline](/harnesses/cline.md)
- current: **Unknown**
- preview: **Unknown**

### JetBrains AI (desktop)

- Harness: [JetBrains AI](/harnesses/jetbrains-ai.md)
- current: **Unknown**
- preview: **Unknown**

### Warp (desktop)

- Harness: [Warp](/harnesses/warp.md)
- current: **Unknown**
- preview: **Unknown**

### Claude CLI (cli)

- Harness: [Claude CLI](/harnesses/claude-cli.md)
- current: **Supported**
  - Target: dated-documentation — current Claude Code documentation; observed 2026-08-28
  - Environment: local-default
  - Constraint (runtime): auto-compaction summarizes history when approaching context limits; retained-state reliability still requires boundary testing
  - Evidence: [Anthropic — Manage Claude Code costs](https://code.claude.com/docs/en/costs) — documented; observed 2026-08-28
  - Qualification note 1: Evidence checked 2026-08-28: Claude Code documents auto-compaction that summarizes conversation history as context limits approach.
- preview: **Unknown**

### ChatGPT CLI (cli)

- Harness: [ChatGPT CLI](/harnesses/chatgpt-cli.md)
- current: **Unknown**
- preview: **Unknown**

### Codex CLI (cli)

- Harness: [Codex CLI](/harnesses/codex-cli.md)
- current: **Unknown**
- preview: **Unknown**

### OpenCode (cli)

- Harness: [OpenCode](/harnesses/opencode.md)
- current: **Unknown**
- preview: **Unknown**

### Gemini CLI (cli)

- Harness: [Gemini CLI](/harnesses/gemini-cli.md)
- current: **Supported**
  - Target: dated-documentation — current Gemini CLI documentation; observed 2026-08-28
  - Environment: local-default
  - Constraint (runtime): the core automatically compresses chat history near the model limit; model.compressionThreshold controls the trigger and defaults to 0.5
  - Evidence: [Google — Gemini CLI core](https://geminicli.com/docs/core/) — documented; observed 2026-08-28
  - Evidence: [Google — Gemini CLI settings](https://geminicli.com/docs/cli/settings/) — documented; observed 2026-08-28
  - Qualification note 2: Evidence checked 2026-08-28: Gemini CLI documents automatic chat-history compression near the configured model's limit and exposes a configurable compression threshold.
- preview: **Unknown**

### Aider (cli)

- Harness: [Aider](/harnesses/aider.md)
- current: **Unknown**
- preview: **Unknown**

### Goose (cli)

- Harness: [Goose](/harnesses/goose.md)
- current: **Unknown**
- preview: **Unknown**

### Copilot CLI (cli)

- Harness: [Copilot CLI](/harnesses/copilot-cli.md)
- current: **Supported**
  - Target: dated-documentation — current GitHub Copilot CLI context-management documentation; observed 2026-08-28
  - Environment: local-default
  - Constraint (runtime): background compaction begins at approximately 80% of the selected model's context window and the run can pause near 95% until compaction finishes
  - Evidence: [GitHub — Managing context in Copilot CLI](https://docs.github.com/en/enterprise-cloud@latest/copilot/concepts/agents/copilot-cli/context-management) — documented; observed 2026-08-28
  - Qualification note 3: Evidence checked 2026-08-28: GitHub Copilot CLI documents automatic background compaction beginning at roughly 80% context usage and waiting for completion if usage reaches roughly 95%.
- preview: **Unknown**

### Amp (cli)

- Harness: [Amp](/harnesses/amp-cli.md)
- current: **Unknown**
- preview: **Unknown**
