Skip to main content
Each model can only work with a limited amount of text at once, called its context window. In a long conversation, the context can get full. Context compaction summarizes the earlier part of the conversation, so the agent keeps working with a summary of everything that happened before. Your messages aren’t deleted. Dust adds a compaction marker to the conversation, and the agent uses the summary instead of the older messages.

When to compact

The context indicator in the message input shows how full the context is, as a percentage. Click it to see the details.
  • From 33%: you can compact. Click the context indicator, then Compact now.
  • From 82%: a banner shows “Conversation context is almost full,” with a Compact now button.
  • From 90%: you must compact before you send a new message. The message input shows “Context is full, compact to continue.”
You can only compact a conversation that has at least one finished agent message. You can’t compact while an agent works, or compact twice in a row without a new message in between.

Compact a conversation

1

Open the context indicator

In the message input, click the context indicator.
2

Compact

Click Compact now.
3

Wait for the summary

The conversation shows “Compacting context, this may take a moment…”. You can’t send messages until compaction finishes.
When compaction succeeds, the conversation shows Context compacted. If it fails, the conversation shows Context compaction failed, and the agent keeps using the full conversation.

What changes after compaction

After compaction, the agent uses:
  • The summary.
  • The messages after the compaction marker.
The messages before the marker are still in the conversation, and you can still read them. The agent no longer reads them in full. If you compact again, the agent uses the latest summary. Dust also saves the full conversation before compaction as a file in the conversation, and tells the agent where it is. When the summary isn’t enough, the agent can read this file to find earlier details.

Limitations

  • A model writes the summary, so it can miss details. The agent can still find them in the file of the full conversation.
  • Compaction can take up to about a minute for a long conversation.

Understanding LLMs Context Windows

Learn what a context window is and why it matters.

Branch a Conversation

Start a new conversation from any point of an existing one.