Long chats and compaction

A long task can keep running in one chat, and DataMind Oda keeps that chat within the space the model can read. This page covers what happens as a chat fills up: the shortening Oda does on its own, the /compact command, and what becomes of very long tool results and images in a big chat.

What happens as a chat fills up

Shorten a chat yourself

Send /compact to shorten the older part of a chat yourself, even before the chat is full. It runs only while the chat is idle:

  1. Type /compact in the message box and send it on its own. The command takes no arguments; anything you add after it is refused with Usage: /compact (no arguments).
  2. If a task is still running or a shortening is already in progress, the command does not start and says so (see the table below).
  3. When it finishes, the chat reports Compacted <n> history items (~<tokens> tokens). The first count is the history items the summary replaced; the second is an estimate of the tokens this freed.

Messages you may see

What happenedOda shows
There is nothing old enough to shortenNo compactable history yet.
You added something after the commandUsage: /compact (no arguments)
A task is running, or another shortening is in progressCompaction is unavailable because this process has an active compaction, or the agent is not idle.
The selected stretch moved on 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.
You stopped itCompaction cancelled.

The summary it leaves, and the exact point where automatic shortening starts, are covered in Chat compaction.

Tool results and images in a big chat

Making room is not only about the conversation's history: when a chat needs space, Oda can also shorten an oversized tool result and leave the oldest images out of what it sends to the model. Both are covered in full, with their limits, on Long outputs and images.

What shortening never touches

Questions, answered

Why does a long chat get compacted?

Every model can read only so much text at once. When a chat comes close to filling that space, Oda replaces an older stretch of it with one summary and continues from there, so a long task can carry on without you moving it to a new chat. You can also shorten a chat yourself with /compact.

Does compaction lose my work?

No. The newest messages stay as they are, and nothing is cut from the chat's record: for the model, the older stretch is replaced by a summary of it, and Oda continues from that summary. Sessions and the transcript explains what the record keeps.

Can I compact a chat early?

Yes. /compact works whenever the chat is idle, even before the chat is full: it shortens the older part there and then.

Why did /compact not run?

Because the chat was not idle: a task was still running, or another shortening was already in progress. The command starts only while the chat is idle. Wait for the work to settle and send it again.

What do the numbers in the result mean?

Compacted <n> history items (~<tokens> tokens). The first count is the history items the summary replaced, and the second is an estimate of the tokens this freed; its ~ marks the estimate.

What happens when I cancel /compact?

The wait ends and the chat shows Compaction cancelled. The cleanup the run needs still finishes, and any message you sent while it ran starts once the chat is free again.