AG-361

Context Truncation Risk Governance

Prompt, Context & Session Management ~15 min read AGS v2.1 · April 2026
EU AI Act SOX FCA NIST ISO 42001

2. Summary

Context Truncation Risk Governance requires that AI agent systems systematically assess, mitigate, and monitor the risks created when context windows are trimmed, summarised, or otherwise reduced. Every language model operates within a finite context window — when the accumulated context exceeds that window, something must be discarded. The truncation strategy determines what the agent forgets, and forgotten information can include safety constraints, critical user requirements, compliance instructions, or material facts that affect decision quality. This dimension mandates that truncation is governed as a risk event rather than treated as a routine technical operation, with explicit rules for what must be preserved, what can be discarded, and how the agent's behaviour is monitored when operating on truncated context.

3. Example

Scenario A — Safety Constraint Truncated From Long Conversation: A financial advice agent has a 128,000-token context window. Its system prompt includes 2,400 tokens of compliance instructions, including: "You MUST NOT recommend products from the restricted list. You MUST verify suitability before any recommendation." After 94 turns of detailed conversation about the customer's portfolio, the context reaches 127,500 tokens. The next user message pushes the context to 129,200 tokens. The truncation strategy removes the oldest tokens — which includes the first 1,200 tokens of the system prompt. The compliance instructions are partially truncated. On turn 95, the agent recommends a product from the restricted list. The customer acts on the recommendation, purchasing £34,000 of an unsuitable product. The organisation faces a mis-selling claim and FCA scrutiny.

What went wrong: The truncation strategy used a simple oldest-first approach that did not differentiate between system prompt instructions and conversation history. Safety-critical compliance instructions were treated as equivalent to early conversation turns. When the context was truncated, compliance constraints were the first content removed. No mechanism detected that safety-critical content had been lost.

Scenario B — Material User Requirements Lost During Summarisation: An enterprise workflow agent handling a complex procurement request summarises earlier conversation turns to fit within the context window. The user specified in turn 3: "The delivery MUST be to our Dublin facility, not London — this is critical for customs purposes post-Brexit." The summarisation retains: "User discussed delivery preferences." When the agent generates the purchase order in turn 28, it defaults to the London facility. The shipment triggers customs complications, a 3-week delay, and £12,800 in additional duties and storage fees.

What went wrong: The summarisation process reduced a material constraint ("MUST be Dublin, not London — critical for customs") to a generic summary ("delivery preferences") that lost the specificity and criticality of the requirement. No mechanism assessed whether the summarisation preserved material constraints, and no mechanism flagged that critical information might have been lost.

Scenario C — Truncation Creates Exploitable Amnesia: An adversary engages a customer-facing agent in a deliberately long conversation, padding turns with verbose but benign content to push the context toward its limit. Once the context is nearly full, the adversary knows that the system prompt's safety constraints will be truncated on the next turn. They then submit a request that would normally be blocked by the safety constraints. The agent, now operating without the truncated constraints, complies. The adversary extracts confidential pricing data that the agent was instructed never to disclose.

What went wrong: The truncation strategy was predictable and exploitable. The adversary understood that the oldest content would be removed and deliberately inflated the context to trigger truncation of safety-critical instructions. No mechanism detected the anomalous context growth pattern, and no mechanism preserved safety-critical content regardless of context pressure.

4. Requirement Statement

Scope: This dimension applies to any AI agent deployment where the context window has a finite limit and where context can be truncated, summarised, or otherwise reduced during operation. This includes virtually all current language-model-based agents. The scope covers: automatic truncation by the model's tokeniser or API, application-layer truncation strategies, context summarisation, sliding window approaches, and any mechanism that removes or compresses information that was previously in the agent's reasoning context. An agent whose context never approaches its limit during normal operation is still within scope — the organisation must demonstrate that it has assessed and mitigated the truncation risk, even if the mitigation is ensuring the context does not reach the truncation threshold. The test is: can this agent ever operate on a context from which previously available information has been removed? If yes, this dimension applies.

4.1. A conforming system MUST implement a truncation strategy that preserves safety-critical content — including system prompt instructions, compliance constraints, and mandate parameters — regardless of context pressure.

4.2. A conforming system MUST detect when context truncation or summarisation has occurred and log the event, including what content was removed or compressed, the truncation trigger (context length, token count), and the preservation status of safety-critical segments.

4.3. A conforming system MUST define and document a priority classification for context segments, specifying which segments are protected from truncation (e.g., system prompt, compliance instructions) and which are eligible for removal or summarisation (e.g., early conversation turns, verbose tool outputs).

4.4. A conforming system MUST prevent the agent from taking high-risk actions when safety-critical context has been truncated, until the context is restored or a human operator confirms that the truncated content is not material to the pending action.

4.5. A conforming system MUST monitor for anomalous context growth patterns that may indicate adversarial attempts to trigger truncation of safety-critical content.

4.6. A conforming system SHOULD implement context budgeting that reserves a fixed allocation for safety-critical content, ensuring that this allocation cannot be consumed by other context sources regardless of total context length.

4.7. A conforming system SHOULD implement summarisation quality checks that verify material constraints, decisions, and commitments from truncated content are preserved in summaries with sufficient specificity for downstream actions.

4.8. A conforming system SHOULD provide agents with explicit awareness of their context state — including whether truncation has occurred and what categories of content have been affected — so that the agent can adjust its confidence and request clarification when operating on partial context.

4.9. A conforming system MAY implement dynamic context window management that offloads non-critical context to external memory stores while maintaining references, allowing retrieval of specific historical context when needed without consuming the active context window.

5. Rationale

Context truncation is an inevitable consequence of finite context windows operating on potentially unbounded interaction histories. Every language model has a maximum context length — 8,000 tokens, 32,000 tokens, 128,000 tokens, or larger — and when accumulated context exceeds that limit, information must be discarded. The question is not whether truncation will occur but what governance surrounds it when it does.

The risk is that truncation is typically handled as a technical implementation detail rather than as a governance event. Default truncation strategies in most frameworks remove the oldest tokens, compress middle sections, or summarise earlier turns. These strategies optimise for context window utilisation but not for governance integrity. A truncation strategy that removes the oldest tokens will, by design, remove the system prompt first — because the system prompt is the oldest content in the context. This is the worst possible outcome from a governance perspective, because the system prompt typically contains the agent's safety constraints, compliance instructions, and operational boundaries.

The adversarial dimension makes this worse. Attackers who understand the truncation strategy can deliberately trigger it by inflating the context with benign content, then exploiting the resulting loss of safety constraints. This is not theoretical — context stuffing attacks are a documented technique in the adversarial AI literature. The defence is not simply a better truncation strategy but a governance framework that treats truncation as a monitored, controlled event with explicit rules for what must be preserved.

The summarisation challenge is equally important. When context is summarised rather than simply truncated, the risk shifts from complete loss to lossy compression. A summary that says "user discussed delivery preferences" when the user said "MUST deliver to Dublin, not London" has preserved the topic but lost the material constraint. Summarisation fidelity is addressed in detail by AG-364, but AG-361 establishes the overarching governance requirement that truncation and summarisation are controlled processes with defined quality standards.

6. Implementation Guidance

Context Truncation Risk Governance requires implementing truncation as a controlled, auditable process rather than a background technical operation. The core principle is that the truncation strategy must be governance-aware — it must understand which context segments are safety-critical and protect them accordingly.

Recommended patterns:

Anti-patterns to avoid:

Industry Considerations

Financial Services. Financial agents must preserve compliance instructions (suitability requirements, product restrictions, disclosure obligations) regardless of context length. Truncation of compliance context in a financial advice interaction could constitute a systems and controls failure under FCA SYSC. Firms should implement P0 protection for all regulatory constraint instructions and log truncation events as part of their regulatory reporting infrastructure.

Healthcare. Clinical agents must preserve patient safety constraints, drug interaction warnings, and allergy information regardless of context pressure. Truncation of a patient's allergy information from context during a long clinical consultation could result in a contraindicated prescription. Protected segment reservation should include all patient safety data with P0 priority.

Legal. Legal agents processing complex cases may operate on contexts that naturally approach window limits. Truncation of material facts, case law citations, or client instructions can lead to incorrect legal analysis. Legal deployments should implement particularly conservative context budgeting and explicit client notification when context constraints require summarisation.

Maturity Model

Basic Implementation — The organisation has implemented a priority-aware truncation strategy that protects system prompt content from removal. Truncation events are logged. Safety-critical segments are identified and protected at the P0 level. The truncation strategy is documented and has been tested to confirm that system prompt instructions survive context pressure. This level meets the minimum mandatory requirements but may not address all truncation vectors (e.g., summarisation fidelity, adversarial context inflation).

Intermediate Implementation — All basic capabilities plus: context segments are tagged with priority levels from P0 to P3. Truncation events are logged with full metadata including removed content, priority level, and preservation status. Context growth rate monitoring detects anomalous patterns. Summarisation quality checks verify preservation of material constraints. The agent is aware of its context state and adjusts confidence when operating on truncated context. High-risk actions are blocked when P0 content integrity cannot be confirmed.

Advanced Implementation — All intermediate capabilities plus: dynamic context window management offloads non-critical context to external memory with retrieval capability. Context budgeting reserves fixed allocations for safety-critical content that cannot be consumed by other sources. Adversarial context inflation attacks are detected and mitigated through rate limiting and content analysis. The organisation can demonstrate through testing that no known truncation attack succeeds in removing safety-critical content. Context state is monitored in real time with operational dashboards showing truncation frequency, priority distribution, and safety-critical preservation rates across all agent deployments.

7. Evidence Requirements

Required artefacts:

Retention requirements:

Access requirements:

8. Test Specification

Test 8.1: Safety-Critical Content Preservation Under Pressure

Test 8.2: Adversarial Context Inflation Detection

Test 8.3: Truncation Event Logging Completeness

Test 8.4: High-Risk Action Blocking on Truncated Safety Context

Test 8.5: Context Growth Rate Monitoring Accuracy

Test 8.6: Priority Classification Enforcement

Conformance Scoring

9. Regulatory Mapping

RegulationProvisionRelationship Type
EU AI ActArticle 9 (Risk Management System)Supports compliance
EU AI ActArticle 15 (Accuracy, Robustness and Cybersecurity)Direct requirement
SOXSection 404 (Internal Controls Over Financial Reporting)Supports compliance
FCA SYSC6.1.1R (Systems and Controls)Supports compliance
NIST AI RMFMANAGE 2.2, MAP 3.2Supports compliance
ISO 42001Clause 6.1 (Actions to Address Risks)Supports compliance
DORAArticle 9 (ICT Risk Management Framework)Supports compliance

EU AI Act — Article 15 (Accuracy, Robustness and Cybersecurity)

Article 15 requires high-risk AI systems to achieve appropriate levels of accuracy, robustness, and cybersecurity. Context truncation that removes safety constraints degrades both accuracy (the agent produces outputs inconsistent with its intended behaviour) and robustness (the system fails under context pressure in predictable, exploitable ways). The requirement for resilience against adversarial manipulation directly applies to context inflation attacks designed to trigger truncation of safety-critical content. Organisations must demonstrate that their truncation strategies maintain system accuracy and robustness under adversarial conditions.

FCA SYSC — 6.1.1R (Systems and Controls)

For financial agents, context truncation that removes compliance instructions represents a systems and controls failure. The FCA expects firms to maintain effective controls at all times during operation, not only when context pressure is below a threshold. Firms must demonstrate that compliance instructions survive context pressure and that truncation events affecting compliance content are detected and addressed.

SOX — Section 404 (Internal Controls Over Financial Reporting)

Context truncation that removes financial processing instructions (e.g., approval thresholds, calculation methods, reporting requirements) is a failure of internal controls over financial reporting. The control must be effective throughout the entire interaction, not only at the beginning. SOX auditors will assess whether the agent's financial controls persist under extended operation.

10. Failure Severity

FieldValue
Severity RatingHigh
Blast RadiusSession-level — affects individual sessions where truncation occurs, but can affect many concurrent sessions if the truncation strategy is systematically flawed

Consequence chain: Context truncation removes safety-critical instructions from the agent's active reasoning context. The agent continues operating without awareness that it has lost constraints, producing outputs that would have been blocked by the truncated instructions. The immediate technical failure is unbounded agent behaviour within the truncated domain — if the truncated content was a product restriction, the agent recommends restricted products; if it was a value ceiling, the agent exceeds the ceiling; if it was a disclosure requirement, the agent omits disclosures. The operational impact scales with the agent's interaction volume and autonomy level. A financial advice agent serving 300 customers per hour that loses its suitability constraint through truncation can generate 300 potentially unsuitable recommendations per hour. The business consequence includes regulatory enforcement for mis-selling or systems failures, customer remediation costs (the £34,000 in Scenario A), reputational damage, and inability to demonstrate that controls were effective throughout the interaction period. The failure is particularly insidious because it may not be detected through routine monitoring — the agent's outputs appear normal in isolation; only comparison against the full (non-truncated) instruction set reveals the deviation.

Cross-references: AG-005 (Instruction Integrity Verification), AG-095 (Prompt Integrity Governance), AG-125 (Prompt Drift Detection), AG-360 (Context Contamination Detection Governance), AG-362 (Instruction Hierarchy Declaration Governance), AG-364 (Conversation Summarisation Fidelity Governance), AG-368 (Long-Context Privileged Segment Isolation Governance).

Cite this protocol
AgentGoverning. (2026). AG-361: Context Truncation Risk Governance. The 783 Protocols of AI Agent Governance, AGS v2.1. agentgoverning.com/protocols/AG-361