Part of the AI Coding Harness Guide — environment design for coding agents in production.

Claude Code "Auto-compact will soon summarize older messages": What /context Is Telling You#

Published by

"Context is N% full. Auto-compact will soon summarize older messages" is a /context suggestion. It shows once the conversation reaches 80% of its auto-compact window. To decide what survives, run /compact with instructions now, for example /compact keep the failing test output and the API decisions. If you do nothing, auto-compact summarizes the conversation at the threshold.[1]

Where the notice comes from#

/context ends with a Suggestions list. The first rule checks how full the conversation is. At 80% or more, it adds a warning titled Context is N% full, and the text depends on whether compaction can run:

StateText after "Context is N% full"
Auto-compact onAuto-compact will soon summarize older messages. Run /compact now to choose what's kept.
Auto-compact off in /configAuto-compact is off. Run /compact to free space, or turn it on in /config.
DISABLE_COMPACT=1Compaction is off.

This wording arrived in v2.1.326 (published November 16, 2026). Before that, the same warning read "Autocompact will trigger soon, which discards older messages. Use /compact now to control what gets kept." The rule did not change, only the words. No changelog entry mentions it.[2]

The warning does not show when the conversation is already past the window. In that case, /context prints an Over limit line instead, with the number of tokens past the compaction window and a pointer to /compact.

What to do when you see it#

The warning gives you a choice about what is kept. It does not mean something is broken.

  • Run /compact <instructions>. A manual compaction follows your instructions. An automatic one decides what to keep by itself. Name the things that a summary usually loses: exact error text, file paths, rejected approaches, decisions you made early in the session.
  • Run /clear if the task is done. A fresh session with a good CLAUDE.md is cheaper than a summary of a finished task.
  • Leave it. Auto-compact summarizes at the threshold, and the session continues.

The other suggestions in the same list show what fills the window. Each rule has a size floor:

SuggestionShows whenAdvice it gives
Bash results using N tokens (also PowerShell)A tool's calls and results use 15% or more of the window and at least 10,000 tokensPipe output through head, tail or grep; use Read with offset and limit, not cat
Read results, Grep results, WebFetch resultsSame 15% and 10,000-token floorRead sections, narrow patterns, extract only what you need
Any other tool20% or more of the windowThe tool uses a large part of the context
File reads using N tokensRead results use 5% or more and at least 10,000 tokensRefer to earlier reads instead of reading again
Memory files using N tokensCLAUDE.md and memory files use 5% or more and at least 5,000 tokensLists the 3 largest files; prune them with /memory
Auto-compact is offAuto-compact is off and the conversation is 50% to 79% fullWithout auto-compact, the session stops at the context limit

Warnings come first, then the others sorted by the tokens they would save.[2]

When Claude Code raises the auto-compact window (v2.1.327)#

The 80% in the warning is measured against the conversation's auto-compact window. In v2.1.327 (published November 17, 2026), that window can change by itself. /context then shows a line such as:

Auto-compact window: raised from 300k to 360k tokens in this conversation, to fit what loads with every request

Why. Some content is sent again with every request after a compaction: the system prompt, tool definitions, instruction files and the summary. If you set a small window with /autocompact and that fixed load fills more than half of the size at which compaction starts, each compaction frees too little space, and the next one starts almost at once. Claude Code then raises the window, for this conversation only, to about twice the fixed load plus room for one reply (up to 20,000 output tokens).[2]

Conditions. All of these must be true:

ConditionDetail
You set the windowSaved with /autocompact in your user settings, and that saved value still applies
The window is 300,000 tokens or moreSmaller windows are never raised
The window is below the model's full contextA full-size window cannot go higher
Fixed load is more than half the compaction thresholdMeasured after a summary
Not a cloud sessionSessions with CLAUDE_CODE_REMOTE set are excluded
Turned on for youTerminal: a server-side flag. Claude Desktop's Code tab: autoCompactRaisedForLoad

autoCompactRaisedForLoad. The settings schema in v2.1.327 describes it as: "Read from the flag settings only, in Claude Desktop's Code tab: true lets a conversation compact at twice what is still in each request after a summary (system prompt, tools, instruction files), where that is above its auto-compact threshold." Flag settings are the settings that the host app passes to Claude Code. A value in your own settings.json is ignored, so you cannot turn this on yourself. It is marked internal and is not in the official settings list.[2]

The same release adds autoCompactOfferAnswer, also read only from flag settings in the Code tab. It records your answer (accept, keep or undo) to the app's offer of a lower auto-compact window.

What to do instead. If /context shows a raised window, your fixed load is too large for the window you chose. Cut it at the source:

  • Look at Memory files and MCP tools in /context. Large CLAUDE.md files and always-loaded MCP servers are the usual causes.
  • Move instructions that apply to part of the code into .claude/rules/ with paths:, which load only when they match.
  • Or set a larger window with /autocompact.

Timeline#

VersionPublishedChange
before v2.1.326/context warns at 80%: "Autocompact will trigger soon, which discards older messages"
v2.1.3262026-11-16New wording: "Auto-compact will soon summarize older messages. Run /compact now to choose what's kept."
v2.1.3272026-11-17Raised auto-compact window, /context "raised from … to …" line, autoCompactRaisedForLoad and autoCompactOfferAnswer flag settings

Neither release mentions these changes in the changelog.[3]

FAQ#

What does "Auto-compact will soon summarize older messages" mean? The conversation has reached 80% of its auto-compact window. At the threshold, Claude Code replaces older messages with a summary. Run /compact now with instructions to choose what the summary keeps.

Is "Context is 80% full" an error? No. It is a warning in the /context suggestions list. The session continues, and auto-compact summarizes the conversation when it reaches the threshold.

How do I stop the warning? Run /compact or /clear to reduce the context. Turning off auto-compact in /config changes the text to "Auto-compact is off", but the warning stays at 80%.

Why did my auto-compact window change by itself? In v2.1.327, if you set a window of 300,000 tokens or more with /autocompact, and the content sent with every request fills more than half of it after a summary, Claude Code raises the window for that conversation to about twice that load. /context shows "raised from X to Y tokens".

Can I set autoCompactRaisedForLoad in settings.json? No. Claude Code reads it only from the flag settings that Claude Desktop's Code tab passes. In the terminal, a server-side flag controls the same behavior.

Sources: [1] Claude Code docs: context window and compaction. [2] Claude Code v2.1.326 and v2.1.327 releases (npm @anthropic-ai/claude-code). [3] Claude Code changelog.

Related: CLAUDE_AUTOCOMPACT_PCT_OVERRIDE and the auto-compact window · "Compacted while idle" · Context window management · Claude Code env-var glossary · Claude Code versions

Get the weekly digest

New Claude Code, Codex, Gemini CLI and OpenCode guides and release analyses, once a week, plus occasional notes.

One email a week plus occasional notes. Confirm by email; unsubscribe from any issue. Privacy