> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentsfleet.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Run context

> Learn how a fleet keeps useful context during long runs.

# Run context

## What it is

Each model has a context limit. Tool results consume that context during a run.

`agentsfleet` can checkpoint findings and remove older tool results from the active context. The activity stream keeps the recorded events.

## Why it exists

A long investigation can make many tool calls. Context controls keep recent evidence available without losing saved findings.

## How it behaves

Use these values under `x-agentsfleet.context` in `TRIGGER.md`.

| Option                    | Effect                                                           | Default            | Valid range                  |
| ------------------------- | ---------------------------------------------------------------- | ------------------ | ---------------------------- |
| `tool_window`             | Keeps this many recent tool results in active context.           | `auto`             | `auto` or a positive integer |
| `memory_checkpoint_every` | Prompts a memory checkpoint after this many tool calls.          | `5` calls          | Positive integer             |
| `stage_chunk_threshold`   | Signals when prompt use reaches this share of the context limit. | `0.75`             | `0.0` through `1.0`          |
| `context_cap_tokens`      | Sets the model context limit.                                    | Active model limit | Positive token count         |

The runtime checks the threshold after each model response. Crossing the threshold records a signal; the fleet decides when to finish.

A later event starts a new run. The fleet can recall the prior checkpoint from memory.

## Limits

The threshold does not interrupt a running tool call. Budget, lease, memory, and process limits can stop a run.

No continuation starts without a new trigger. Send a new message or event when you want the fleet to continue.

## Related pages

* [Memory](/memory)
* [Budgets](/billing/budgets)
* [Author a fleet](/fleets/authoring)
