Conflicting Instructions in AI Agents: Causes and Fixes
An agent gets contradictory guidance from the system prompt, user messages, tool outputs or injected content and resolves the conflict unpredictably.
Context window management failures — lost context, truncation, and lifecycle bugs
14 patterns
Context window management failures — lost context, truncation, and lifecycle bugs. We've tracked 14 distinct Context Window Management patterns across production AI agent deployments — most commonly in Accuracy, Operations systems. One recurring example: Conflicting Instructions in AI Agents: Causes and Fixes — An agent gets contradictory guidance from the system prompt, user messages, tool outputs or injected content and resolves the conflict unpredictably.
Each pattern below documents the specific failure mode, why it happens, and how teams have mitigated it in practice — use this page as a reference when building guardrails, writing evals, or debugging an agent that's already misbehaving in this way.
An agent gets contradictory guidance from the system prompt, user messages, tool outputs or injected content and resolves the conflict unpredictably.
Race Conditions During Context Assembly Cause Inconsistent State
Task Exceeds Context Window Limits
Low-Priority Content Displaces High-Priority Content
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
Outdated Information Kept While Current Information Discarded
Agent Has Incorrect Understanding of Current State
System Prompt Gets Truncated or Overwritten
Critical Information Lost When Context is Truncated
Content Cut at Token Boundaries Creates Artifacts