---
title: "History and recovery"
description: "Agent definition fields for history and recovery."
canonical_url: "https://docs.oz0.ai/reference/agent-definition/history"
---
# History and recovery

> Agent definition fields for history and recovery.

For: Plugin authors looking up agent fields.

Look up the fields below when editing an agent definition.

<field-group>
<field name="history.continue_after" type="integer">

Model requests per workflow run before the job continues as new under the same ID. Unset means only when Temporal suggests it. See [Long jobs](https://docs.oz0.ai/agents/long-jobs).

</field>

<field name="history.compact" type="string">

`summarize` or `trim`: how older turns leave a long conversation. Unset keeps the whole conversation.

</field>

<field name="history.max_messages" type="integer">

The conversation's length that starts a compaction. Unset means 40.

</field>

<field name="history.keep_messages" type="integer">

The newest messages a compaction keeps as they are. Unset means 12; at least 2, and less than `max_messages`.

</field>

<field name="conversation.continue_from" type="string[]">

Other agents whose [conversations](https://docs.oz0.ai/agents/conversations) this agent may continue, a hand-over; `"*"` for any agent of the tenant. It always continues its own. Only for an agent whose input is text, or a schema whose only required property is a string `message`.

</field>

<field name="restart" type="string">

`ask`: a harness session of this agent that is lost with its node always waits for a person's `restart` approval before a fresh session starts from the job's input. Without it, a fresh session starts by itself when the agent is restart-safe, which `oz0 plugin lint` shows per agent (`restart: automatic` or `restart: ask` with the reasons), and asks otherwise ([When a node is lost](https://docs.oz0.ai/build/parts/harnesses/recovery#when-a-node-is-lost)). `ask` is the only value: nothing in a definition makes a restart automatic. For harness and remote agents; lint warns on another runtime.

</field>

<field name="offload" type="integer or off">

The most tokens a tool result's text may weigh (the platform's estimate) before the model reads a stub of it instead: the result's size and an outline made without a model, with `oz.read_result` to read a section, a range of lines or a view of it back ([large results](https://docs.oz0.ai/build/parts/tools/results-and-files#large-results)).

From 500 to 1,000,000, or `off` to keep every result inline. Unset, the tenant's default applies, or 10,000 (provisional, until measured). The tenant's ceiling caps it, and an `off` becomes the ceiling where the tenant set one.

Only a model's calls of plugin functions are offloaded, never a flow step's; a job in which no agent lists a plugin function is not offered `oz.read_result` (an `openai-agents` router that lists none still offloads the results of the hand-off targets that run in its job); a remote agent's are not, and lint warns that the setting does nothing there.

</field>
</field-group>

[Back to the agent definition](https://docs.oz0.ai/reference/agent-definition).


## Sitemap

See the full [sitemap](https://docs.oz0.ai/sitemap.md) for all pages.
