Tool result pruning and image offload

A long chat has to stay inside what the model can read. Two steps help when it no longer fits: DataMind Oda trims oversized tool results, and it sets aside images the request has no room for. Both are part of how Oda works by default, and both change only what the model receives; the chat keeps everything. For when Oda condenses a chat in the first place, see Chat compaction.

Trimming oversized tool results

A tool result is what a tool handed back to Oda: the text of a file it read, the matches of a search, or a command's output.

The trimming limits

All three limits are optional, and their defaults are:

LimitDefaultWhat it decides
thresholdChars8192How long a result's text may be before it is trimmed, counted in characters.
headChars4096How much of the start of a result is kept, counted in characters.
tailChars1024How much of the end of a result is kept, counted in characters.

When a request runs out of room for images

A model takes only so many images, or so many bytes of images, in one request. When a request goes past that, Oda sets the oldest of the images it holds aside and sends the request again. The limits themselves, and the notes a request carries, are in Image and file limits in requests.

Questions, answered

What does [... tool result middle pruned ...] mean?

It is the marker Oda puts where it removed the middle of a long tool result to make room in the chat. The kept start and the kept end of the result appear around it in what the model receives.

When does Oda trim tool results?

Only when the chat reaches the point where Oda condenses it: the trimming happens as part of that round, before the older history is summarised. A shorter chat keeps its tool results untouched, and the trimming makes no model call of its own. Chat compaction covers when the condensing starts.

Is the full tool result lost when it is trimmed?

No. The full original stays in the chat log on this computer; only what the model receives is shortened, and the model never gets a second copy of the removed text. Chat logs on disk shows where the logs live.

What happens to images and other content inside a trimmed result?

They stay. Trimming measures and changes only the text of a result; images, structured content, the tool call, its errors, its step and its other details keep their places.

Can I change the trimming limits?

Yes. The three limits are part of Oda's settings for this computer, with defaults of 8,192 characters for the trimming limit, 4,096 for the kept start and 1,024 for the kept end. The profile settings file shows where those settings live and when to edit them.

Why does a cut land in the middle of a word or symbol?

The limits count characters, not words, so a cut can fall anywhere between them. It never lands inside a single character, but a symbol built from several characters, such as some emoji, can still come apart.

After trimming, does Oda still summarise the chat?

Oda measures the request again. When the shorter results have brought the request back within the chat's room, that round needs no summary; otherwise the summary runs as usual.

Why did a call fail over images and then go through?

The model refused the request because it carried more images, or more image bytes, than the model accepts. Oda set the oldest images aside and sent the request again. Oda cannot set images aside in advance: the refusal is the signal, so each set-aside round starts with one failed attempt.

Do images that were set aside come back to the model?

No. A set-aside image stays out of the model's requests for good: a larger limit, a different model or a later condensing round does not return it. The chat keeps the image, and the note gives the path of a read-only copy, so you can attach it again if you need it.

Does the set-aside retry use up the call's retries?

No. The retry repairs what the request carries instead of repeating the call, so it spends none of the model call's retries. How calls fail and retry is in Model calls and failures.

What happens when there are no images left to set aside?

The request still fails, and the turn reports an error. Each set-aside round can remove only the images that remain, so a request that stays too large ends this way.