Constraint Drift in Long-Horizon LLM Agents: How Language Models Forget What They Were Told to Do
Large language model (LLM) agents deployed on long-horizon tasks are routinely initialized with user-specified constraints. We identify and formally characterize a failure mode termed constraint drift — the progressive degradation of adherence to initial task constraints as agent execution extends across longer contexts and deeper sub-task chains. Through systematic empirical study across three frontier LLMs (GPT-4o, Claude 3.5 Sonnet, Gemini 1.5 Pro) on four task domains, we demonstrate that constraint violation rates increase monotonically with task horizon length, with a mean 3.4x increase between the first and fourth task quartile. We introduce a five-category taxonomy of drift, DRIFT-Bench (a 240-task benchmark), and three mitigation strategies — Periodic Constraint Injection (PCI), Hierarchical Constraint Anchoring (HCA), and Constraint-Aware Summarization (CAS) — achieving up to 77% drift reduction when combined.
Authors
- Diwakar S (ORCID: https://orcid.org/0000-0002-1265-5202)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-06-24
- DOI
- https://doi.org/10.5281/zenodo.20834503
- Primary Topic
- Artificial Intelligence in Healthcare and Education
- Type
- preprint