Context and reliability
Context management: preserve the signal that changes the next decision.
Reliable agent systems do not treat context as an ever-growing transcript. They decide what belongs in working memory, what should be retrieved, what can be compacted, and what must be verified before it drives an action.
Context is a decision system
A long context can contain more facts while still producing a worse decision. Important instructions may be buried, old state may contradict new state, and untrusted material can be mistaken for an instruction. Good context design protects the information that matters and keeps its source clear.
When comparing architecture options, prefer the one that makes provenance, freshness, and failure behavior explicit. “Keep everything” is rarely a strategy; it is usually deferred ambiguity.
Five context-management patterns
Select the signal
Keep information because it changes the next decision, not simply because it appeared earlier in the conversation.
Summarise with purpose
A summary should preserve decisions, constraints, unresolved questions, and provenance—not merely shorten the transcript.
Retrieve just in time
Fetch the smallest relevant source set near the point of use. This reduces noise and keeps critical instructions easier to follow.
Own the state
Make it clear whether the conversation, application database, tool result, or user is the authority for each fact.
Recover deliberately
When evidence is missing or conflicts, return an uncertainty signal, retry with a bounded strategy, or escalate instead of inventing certainty.
A recovery-first review loop
- Identify the fact or constraint the next action depends on.
- Locate the authoritative source and check whether it is current.
- Provide only the relevant evidence to the agent or workflow.
- Define what happens if the source is unavailable, malformed, stale, or contradictory.
This turns reliability into a visible design choice. A workflow that can explain what it knows, what it does not know, and what it will do next is safer than one that silently fills gaps with plausible output.
Primary sources to verify
Test your reliability judgment.
Use original scenarios to practise choosing the right state, retrieval, and recovery design.
Practise context questions →