# Context Window Management

> Foundry reduces "agent amnesia" and token waste.

Source: https://bifrost5.com/foundry/docs/context-window/

# Context Window Guide

Information

Keep long jobs on track across many sessions and tools, with Production-Grade support when you need a hand.

[See editions](/foundry/docs/editions)

Foundry reduces "agent amnesia" and token waste.

## Working Memory (Sliding Window)

Only the **last few completed tasks** (ID, intent, success status) are injected into the runtime context - not the full project history. That keeps prompts focused and cheaper.

## Helper Sessions

Helper agent sessions are isolated per project (e.g. `helper:validation:<projectId>`). Sessions are reused across invocations so the helper doesn't re-ingest huge context every time. When a provider hits token limits, Foundry rotates the session automatically.

## Result Caching

Validation results are cached (e.g. in Redis). If file content and criterion haven't changed, the previous result is reused so you avoid repeated AI validation.
