Conflicting Instructions
Agent Receives Contradictory Instructions
8 patterns for this goal
Agents lose or misapply context over long conversations because system instructions become proportionally smaller as conversation history grows, conflicting instructions from multiple sources lack a declared resolution order, or state tracking breaks across session boundaries. These failures are silent: the agent still produces well-formed output, but it violates earlier constraints, forgets important decisions, or becomes confused about which instruction to follow when two sources conflict.
None of the 8 context-management patterns are solved by simply making the agent “try harder” to follow instructions. The recurring mitigation across patterns is architectural separation: (1) maintain instructions in a separate store outside the context window so their weight doesn’t dilute as conversation grows; (2) maintain state in an external database rather than relying on context-based memory; (3) enforce explicit session boundaries so prior-session context cannot leak; (4) resolve instruction conflicts pre-execution via a policy engine rather than asking the agent to adjudicate contradictions. If a system implements only token-level optimizations (e.g., re-injecting instructions via prompting) without structural separation (external state store, policy engine), the mitigation is incomplete.
Context management failures affect how the agent handles instructions and state, not the correctness of generated content. An agent following the wrong instruction due to a context conflict still produces well-formed output — the output simply violates a constraint the agent should have followed. Accuracy failures (hallucination, fabrication) cover generation of content not supported by any source. See Output Accuracy for fabrication and hallucination patterns.
Instruction drift is when a constraint weakens gradually over a long conversation because it’s proportionally smaller in context (the model’s attention shifts toward recent turns). Context overflow is when information exceeds the hard window limit and is truncated, so later questions about early-conversation content cannot be answered at all. Drift is degradation of constraint influence; overflow is information loss.
Increasing window size reduces the frequency of context overflow but does not solve the underlying problem. Instruction drift still occurs because attention patterns favor recent content regardless of window size. Conflicting instructions still lack a resolution order. State tracking still needs durability outside context. Window size is one knob among several architectural components needed for reliable context handling.
Instruction conflicts (safety constraints violated due to user-level contradictions) and state tracking corruption (wrong decisions propagated to downstream systems) are highest-priority, as they directly undermine system safety and data integrity. Context overflow and instruction drift degrade performance gradually but are harder to detect because they’re not discrete failures — they manifest as gradual quality degradation.
| Pattern | Mechanism |
|---|---|
| Conflicting Instructions | Multiple instruction sources contradict; agent resolves unpredictably without declared hierarchy |
| Context Overflow | Document or conversation exceeds window limit; early critical requirements forgotten |
| Cross-Session Confusion | Context from prior session leaks into new conversation; agent applies outdated decisions |
| Instruction Drift | Constraint weakens gradually over long conversation as instructions become proportionally smaller in context |
| Long-Session Context Loss | Explicit constraints from early turns are truncated; agent violates them later in long sessions |
| Lost State | Agent loses track of decisions/state made earlier in conversation; repeats questions or contradicts earlier answers |
| Memory Corruption | Agent’s tracked state becomes inconsistent or wrong; downstream logic that depends on state produces errors |
| State Awareness | Agent loses awareness of its own state or role; becomes confused about what it’s supposed to be tracking or doing |
Total: 8 patterns
Agent Receives Contradictory Instructions
Task Exceeds Context Window Limits
Agent Confuses Information Across Sessions
Agent Gradually Deviates from Original Instructions
In a long conversation, agent establishes constraints, decisions, or flags early (banned phrase, disqualified candidate, SLA exception, allergy, privilege determination), but as session grows, that information falls out of effective context window; agent later violates the constraint or re-makes the excluded decision
Agent Loses Track of Conversation State
Agent's Long-Term Memory Becomes Corrupted
Agent Has Incorrect Understanding of Current State