Omniscio

OmniscioGuidesCompaction not making progress

Claude Code: compaction is not making progress

Last checked against Anthropic's documentation on November 13, 2026. By the Omniscio team. Updated .

What is compaction, and what went wrong?

Claude Code keeps the whole conversation in a fixed amount of memory, called the context window. When that memory is nearly full, it makes room by summarizing the older part. That pass is compaction.

Thrashing means going round in circles. The memory fills, compaction clears space, and the same file or tool output fills it again. After several rounds of that, Claude Code stops. Retrying would cost time and money and fail the same way.

Anthropic's documentation words it like this:

Autocompact is thrashing: the context refilled to the limit...

People also search for it as cannot compact this conversation. That prefix covers several messages in this family. This page is the one where the thing filling the window comes straight back after every compaction; if your line continues differently, the compaction errors hub lists the rest.

Why does it keep filling up?

Usually one item is bigger than the room the session has left.

  • A whole file. Claude read a large file in one go, and all that text now sits in the conversation.
  • A tool result. A test run, a build log or a long file listing printed thousands of lines.
  • Too much loaded at the start. What loads when a session starts can leave very little room, so the first big read fills it.

The clue is that it repeats. One large read is normal. The same large read coming back after every compaction pass is the loop.

How do I fix it?

Type these in the same box you type your messages. Anthropic documents four steps, and they work best in this order.

  1. Have Claude read the big file a bit at a time instead of all at once. Say something like: Read that file 200 lines at a time.
  2. Run /compact with a focus that drops the big output, for example /compact keep only the plan and the diff.
  3. Hand the big file to a subagent, which is a helper with its own separate memory. Say: Use a subagent to read that file and tell me what matters in it. How subagents work.
  4. /clear starts a completely fresh conversation, and everything said so far is gone. That is why it comes last.

A plain /compact has no reason to drop the big output, so the refill comes straight back. Give it a focus instead.

Why does it come back after /clear?

Because the old conversation was not the problem. Run /context to see what is using the memory: your conversation is on the Messages row, and things loaded at the start are on the rows above it.

  • Messages is the largest row: a file or tool output in the new conversation is filling the window. Work through the first three steps again.
  • The other rows together are larger: too much is loaded before you even start, usually files the project pulls in. The context window guide explains what those rows are and what you can turn off.

What if the line names a different error?

Sometimes compaction did not just loop, it failed, and the line says why:

Prompt is too long · automatic compaction failed: <the underlying error>

Fix the error after the colon first. /compact keeps failing the same way until you do.

If the line reads Context limit reached · /compact or /clear to continue · auto-compact is off · /config to turn it on, the Auto-compact toggle in /config turns it back on. The plain Context limit reached · /compact or /clear to continue line says nothing about auto-compact either way.

The compaction errors hub indexes every message in this family one at a time, including the one that says the conversation could not be reduced, and the error message index covers the wider set.

Common questions

What does it mean when Claude Code says compaction is not making progress?

Compaction ran, and then the same file or tool output filled the context window again, several times in a row. Claude Code stops retrying rather than spend API calls on a loop that is not making progress. Anthropic's documentation prints the sentence as: Autocompact is thrashing: the context refilled to the limit...

Does running /compact again fix it?

Not on its own. A plain /compact has no reason to drop the big output, so the refill comes straight back. Run /compact with a focus that drops it, for example /compact keep only the plan and the diff, and read the oversized file in smaller pieces from then on.

Why does it come back after /clear?

Something in the new conversation is filling the window again, or what loads at session start leaves too little room to work in. Run /context and compare the Messages row with the rows above it: if Messages is the largest row, work through steps 1 to 3 again; if the other rows together are larger, trim what loads at startup.

Should I move the large-file work to a subagent?

Yes, that is Anthropic's third recovery step. A subagent runs in a separate context window, so the large file or tool output it reads is not added to your main conversation. Your session then keeps its room for the work you are doing.

Where these answers come from