How It Works
Quick Start
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
retain_full_context | bool | False | When True, pass all prior task outputs; when False, pass only the immediate predecessor’s output |
Common Patterns
Pipeline pattern
Each step passes only its own output forward — ideal for large intermediate data:Checkpoint pattern
Periodically retain full context so a later task can see the full history:Summarisation checkpoints
Insert a summary task that reads full context, then continue with minimal context:Best Practices
Plan context flow upfront
Plan context flow upfront
Map which tasks need full history versus only the previous output before running long workflows. Data-loading steps usually need
retain_full_context=False; final synthesis steps often need True.Use checkpoints in long pipelines
Use checkpoints in long pipelines
For workflows with many steps, add periodic summary or checkpoint tasks with
retain_full_context=True so downstream tasks can recover context without carrying every intermediate payload.Avoid token limit errors
Avoid token limit errors
If later tasks hit context limits, set
retain_full_context=False on early heavy tasks and pass summaries instead of raw data.Combine with context compaction
Combine with context compaction
Pair selective retention with Context Window Management for automatic overflow protection on agents.
Related
Context Window Management
Automatic token management for agents
Workflow Validation
Validation loops with controlled context

