You spend an hour teaching an AI assistant about your business. You explain your offer, your prices, the way you talk to customers and the three things you never say. It finally sounds like you. Then, somewhere in the next twenty minutes, it starts asking about your pricing again.

Nothing broke. The tool hit a size limit, wrote itself a summary of your hour, threw the original away, and carried on from the summary. That is context compaction, and the pages explaining it address software engineers: Anthropic's developer cookbook, an OpenAI API reference, a research paper, and a Reddit thread where developers ask each other what is happening to their conversations. Nobody has written it down for the person who just spent that hour.

I had a version of this in my own week. Most of the slides for my biggest one-to-one client were not typed, they were talked: voice notes into a Claude project, with a plugin putting the result into PowerPoint. The part that makes that work is not the voice input. It is that every client I work with has their own knowledge base and their own project, so the AI starts from written-down facts rather than from whatever I remembered to say in the chat window.

What is context compaction?

Context compaction is the automatic housekeeping an AI tool performs when a conversation grows too long to fit in the model's working memory. The tool stops, asks the model to write a summary of everything so far, throws away the original conversation, and continues with the summary in its place. That working memory has a name, the context window. It is the maximum amount of text a model can keep in view for a single reply. Compaction is what happens when you reach the edge of it.

Anthropic's own documentation describes the sequence in five steps: monitoring token usage per turn, injecting a summary prompt once a threshold is exceeded, having the model generate a summary, discarding the history, and continuing with the compressed context. Its wording for the fourth step is "clearing the conversation history and resuming with only the summary". The default threshold in that implementation is 100,000 tokens. OpenAI describes its version more briefly, as a way "to reduce context size while preserving state needed for subsequent turns".

"Clearing" is the word to notice. Your conversation is not compressed in place, it is replaced.

Two quick separations, because the term collides with other things. This is not soil compaction, the construction term for pressing ground down before you build on it. It is also not database compaction, the storage operation that merges old records, which is what you will find if you search the word alongside Kafka or Cassandra.

When does context compaction happen?

It happens when your conversation crosses a size limit, and in most consumer tools you are not told when it does. Claude and ChatGPT both run long conversations in interfaces that manage this for you. The developer-facing versions expose a configurable threshold, and Anthropic's default sits at 100,000 tokens, which is a long working session rather than a quick question.

What reaches you as a user is subtler. The assistant that knew your pricing an hour ago starts asking about it again. The tone you spent twenty minutes correcting drifts back. Nothing announces itself, because from the tool's point of view nothing broke. It summarized, it continued, and it kept working.

What survives compaction, and what does not?

A summary survives, and the original does not. Anthropic states the trade-off plainly in its own documentation: "Summaries inherently lose some information. While Claude is good at identifying key points, some details will be compressed or omitted."

Which details get dropped is not something you can inspect. OpenAI's documentation is unusually direct about this, describing its compaction output as "opaque and not intended to be human-interpretable". The mechanism that decides what your AI forgets about your business is, by design, not readable by you.

This is the part that matters for a business owner rather than an engineer. You cannot audit it, you cannot appeal it, and nobody will notify you. You can only decide in advance what you are willing to lose.

Does it keep your words or rewrite them?

Research submitted in August 2026 gives the two approaches names. In "Context Compaction Theory", Hayder Tirmazi, Sam Markelon, Allison Bishop and Michael Mitzenmacher describe two strategies used by real AI agents. The Context Selection Game "models context compaction algorithms that select a subset of an agent's accumulated state to retain". The Context Generation Game "models context compaction algorithms that summarize an agent's state by an arbitrary message of bounded length".

In plain terms, selection keeps some of your actual words and discards the rest. Generation rewrites everything into a shorter version, in the model's words rather than yours. The paper proves that generation can do more with less: "there exists a set of queries for which generation needs strictly less budget than selection".

That result cuts both ways for you. Generation is more efficient, and it is also the approach that replaces your exact wording with a paraphrase. If what you handed the AI was a carefully worded description of how you talk to customers, a summary of it is not the same asset.

The same authors open with a sentence worth quoting for a different reason: "Despite its ubiquity, context compaction has received essentially no formal analysis." This is running inside tools that are in everyday use, and the first formal study of it was submitted in August 2026.

What does this mean if you run your business alone?

It means that everything you explain inside a chat window is temporary, and everything you keep in a file is not.

Say your offer, your prices, your customer's objections and your writing rules live only in a conversation. Once the limit arrives, a summarizer you cannot see decides which of them survives. A file you attach or a project you set up can be opened again in a new conversation, which is not true of anything you only typed.

The client folders I mentioned at the top are not a tidiness habit. They are the part of the setup a summarizer cannot touch. It is also why a narrower helper you hand one job to works at all. What you hand it is written down rather than remembered.

That is the whole practical difference, and it is why the fix is structural rather than clever. The fix is not a better prompt, it is having the material written down somewhere you can hand over again instead of somewhere that gets summarized.

Business Brain, the seven-day course that builds you a knowledge base for AI, teaches exactly that move. It is €67 one time, four modules across 22 lessons, about an hour a day for a week, in English, and it needs no code beyond one backup step in GitHub Desktop.

When is compaction the wrong tool?

Naming limits is more useful than pretending there are none, and the primary sources name theirs.

Anthropic's documentation lists four cases where you should avoid compaction:

  • Short tasks that finish within 50,000 to 100,000 tokens, where it "adds unnecessary overhead".
  • Tasks requiring full audit trails, where you need "access to ALL previous details".
  • Server-side sampling workflows, which it flags as a current limitation.
  • Highly iterative refinement, "where each step critically depends on exact details from all previous steps".

That last one describes a lot of real work. Editing a long document line by line, reconciling figures, or working through a contract clause by clause are all tasks where a summary of the earlier steps is not good enough.

Compaction is also not a memory feature. It exists to keep one session running, not to bring anything into the next one. A fresh conversation tomorrow starts with nothing, summary included.

And compaction is not the only way a long conversation loses quality. Reliability also drops as the input grows, before any limit is reached, and that is context rot rather than compaction.

The short version

  • Context compaction is the automatic replacement of a long AI conversation with a shorter summary of it, so the session can continue.
  • Size triggers it, not you, and in consumer tools it usually happens silently.
  • The original conversation is cleared, not compressed. Anthropic's documentation describes "clearing the conversation history and resuming with only the summary".
  • Summaries lose information by design, and which information is lost is not something you can inspect.
  • There are two known strategies: keeping a subset of the original, or rewriting it all into something shorter.
  • The paper's authors state that context compaction had received essentially no formal analysis before theirs, which was submitted to arXiv on 2 August 2026.
  • Anything you keep as a file can be handed to a new conversation, which is not true of anything you only typed into an old one.
  • Compaction is not memory. It brings nothing into your next conversation.

What to do this week

Find out what your AI actually knows about your business before you rely on it knowing anything. The Business Brain AI Audit is free and it is the honest first step: take the audit.

If you already know the answer is "not enough", Business Brain is the seven-day version of the fix.

Frequently asked questions

What does it mean when my AI says it compacted the conversation?

It means the tool has reached its size limit, summarized the conversation so far, and discarded the original. Work continues from the summary. You have not lost the session, and you have lost some of the detail inside it.

Does compacting context cost tokens?

Yes. Generating the summary is itself a request to the model, so it consumes tokens at the moment it happens. It saves tokens afterwards, because every following turn sends the short summary instead of the long history.

Is compacting context bad?

No, it is a trade. Without it a long session would simply stop. With it the session continues on less information. It becomes a problem only when the discarded detail was the thing you needed.

What survives context compaction?

The summary the model writes, and nothing else from the cleared history.

What is context window compaction?

The same thing. The context window is the model's working memory, and compaction is the operation that makes a conversation fit back inside it.

How does context compaction work in Claude?

Anthropic's documented approach monitors token usage, and once a conversation passes a configurable threshold it asks the model to summarize, clears the history, and resumes with the summary. The default threshold in its developer documentation is 100,000 tokens. ChatGPT offers a comparable capability through its own compaction endpoint.

Can I turn context compaction off?

In developer tooling it is a setting. Consumer chat interfaces generally do not expose it. The practical control you have is not switching it off but keeping the material you care about somewhere you can hand over again.

Does compaction mean my AI remembers me next time?

No. Compaction keeps one conversation alive. It brings nothing into a new one.

Listen to this episode on your favorite platform!

about the AUTHOR

Hey there. I'm Julia

A marketing strategist passionate about building bridges between people and tech. I help entrepreneurs simplify their marketing and share their stories so they can grow their businesses with clarity and ease—without burning out.

Now the awkward question. How much of your business does your AI already know about you?

Free. No credit card. A few minutes.