Chat compaction

Every model can read only so much text at once. When a long chat fills that space, DataMind Oda condenses the older part of the conversation into one summary and continues from it. This page covers when compaction happens on its own, how to run it yourself, and what the summary keeps.

When Oda compacts a chat on its own

Compact a chat on demand

Run /compact in the message box to condense the older part of the conversation yourself, even when the chat has not reached the automatic threshold. It is one of the chat's commands; Chat with Oda lists the others.

  1. Type /compact in the message box and send it on its own. It takes no arguments.
  2. If a turn is still running, or another compaction is active, it does not start and the chat shows Compaction is unavailable because this process has an active compaction, or the agent is not idle. Run it again once the chat is idle.
  3. When it finishes, the chat shows Compacted <n> history items (~<tokens> tokens). The counts are the history items condensed and an estimate of the tokens this freed.

What the checkpoint keeps

Messages the command can show

WhenWhat appears
There is nothing old enough to condense yetNo compactable history yet.
The command is sent with argumentsUsage: /compact (no arguments)
A turn or another compaction is still runningCompaction is unavailable because this process has an active compaction, or the agent is not idle.
The selected history changed while it ranThe history selected for compaction changed before it could be replaced. The attempt is recorded in the session log.
No useful summary could be madeCompaction could not produce a useful summary. The attempt is recorded in the session log.
It did not finish cleanlyCompaction did not finish cleanly; some session history may have changed. Inspect the current session state before retrying.
It finished, but the chat could not be savedCompaction finished, but the session could not be saved.
It was stoppedCompaction cancelled.

Questions, answered

How full does a chat get before Oda compacts it?

Oda condenses on its own when the conversation crosses the compaction threshold: by default, the lower of 80% of the model's context window and the window minus its reserved output space and a 65,536-token headroom. The context ring shows the same figure while you work.

Can I compact a chat before it fills up?

Yes. Send /compact whenever the chat is idle; it condenses the older part of the conversation even before the automatic threshold is reached.

Why is /compact unavailable?

A turn is still running, or another compaction is active, so the command did not start. The chat shows Compaction is unavailable because this process has an active compaction, or the agent is not idle. Wait until the chat is idle and run it again.

Is the older part of the chat deleted when it is compacted?

No. The chat keeps its record of every message; compaction changes what Oda sends to the model, replacing the older part with the summary. The marker it leaves in the conversation is covered in System prompt, context and compaction.

What does the summary keep?

The summary follows a fixed outline: Primary Request and Intent, Key Technical Concepts, Files and Code, Errors and Fixes, Pending Jobs, Current Work, Next Step and Critical Context. The work continues from it in place of the older messages.

What happens to a message I send while compaction runs?

It waits. Messages sent during a compaction stay queued and start when it finishes; they are not lost or reordered.

Can I stop a compaction while it runs?

Yes. Stopping it ends your wait and the chat shows Compaction cancelled.; the cleanup the run needs still finishes.

Can I choose which part of the chat gets compacted?

No. The command takes no range or policy arguments: Oda condenses the older part of the conversation and leaves the newest messages as they are. Anything you add after the command is refused with Usage: /compact (no arguments).

Does compaction change the system prompt or the tool list?

No. Compaction works on the conversation's history only; it never shrinks the system prompt, the tool definitions or the start of the session.

Why did /compact say it could not produce a useful summary?

Oda could not make a summary smaller than the part it would replace, so it left the chat as it was. The attempt is recorded in the session log, and you can try again when the chat is idle.

What do the warnings about changed history mean?

Two messages mention change. If the chat says the history selected for compaction changed before it could be replaced, the selected part moved on while the run was in progress and nothing was replaced; run the command again if you still want it condensed. If it says the compaction did not finish cleanly, check the chat's current state before retrying. In both cases the attempt is recorded in the session log.