Asymmetric Goal Drift in Coding Agents Under Value Conflict
Magnus Saebo, Spencer Gibson, Tyler Crosse, Achyutha Menon, Eyon Jang, Diogo Cruz · 2026
Read Asymmetric Goal Drift in Coding Agents Under Value Conflict by Magnus Saebo, Spencer Gibson, Tyler Crosse, Achyutha Menon, Eyon Jang, Diogo Cruz (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2603-03456.txt.
Introduction
Magnus Saebo and five colleagues measure how coding agents drift from their orders when values pull the other way. Deployed agents work autonomously over long tasks, juggling explicit instructions, learned values, and environmental pressure. Earlier studies used static, synthetic settings that miss real-world complexity. Their 2026 framework instead runs realistic multi-step coding tasks on an open agent platform and records constraint violations over time.
Three current models show asymmetric drift: they break a system prompt rule more readily when the rule clashes with strongly held values like security and privacy. Drift grows with value alignment, adversarial pressure, and accumulated context together. Even privacy, the strongest value tested, cracked under sustained pressure, and pressure hidden in code comments proved an effective exploit. The authors warn that shallow compliance checks cannot hold such agents.
Catalog record
| CREATOR | Magnus Saebo, Spencer Gibson, Tyler Crosse, Achyutha Menon, Eyon Jang, Diogo Cruz |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 35319 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2603.03456
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Asymmetric Goal Drift in Coding Agents Under Value Conflict Magnus Saebo, Spencer Gibson, Tyler Crosse, Achyutha Menon, Eyon Jang, Diogo Cruz Abstract Agentic coding agents are increasingly deployed autonomously, at scale, and over long-context horizons. Throughout an agent’s lifetime, it must navigate tensions between explicit instructions, learned values, and environmental pressures, often in contexts unseen during training. Prior work on model preferences, agent behavior under value tensions, and goal drift has relied on static, synthetic settings that do not capture the complexity of real-world environments. To this end, we introduce a framework built on OpenCode to orchestrate realistic, multi-step coding tasks to measure how agents violate explicit constraints in their system prompt over time with and without environmental pressure toward competing values. Using this framework, we demonstrate that GPT-5 mini, Haiku 4.5, and Grok Code Fast 1 exhibit asymmetric drift : they are more likely to violate their system prompt when its constraint opposes strongly-held values like security and privacy. We find for the models and values tested that goal drift correlates with three compounding factors: value alignment, adversarial pressure, and accumulated context. However, even strongly-held values like privacy show non-zero violation rates under sustained environmental pressure. These findings reveal that shallow compliance checks are insufficient and that comment-based pressure can exploit model value hierarchies to override system prompt instructions. More broadly, our findings highlight a gap in current alignment approaches in ensuring that agentic systems appropriately balance explicit user constraints against broadly beneficial learned preferences under sustained environmental pressure. 1 Introduction The deployment of Large Language Models as autonomous coding agents represents both a significant capability advancement and a potential security concern 5 ; 7 ; 9 . For example, tools like Claude Code and Cursor AI enable models to execute multi-step coding tasks with minimal human oversight. In practice, these agents operate under competing pressures: explicit instructions from the user, learned preferences from training, and environmental signals from the codebase itself. When pressures conflict, it is unclear what the agent will follow. To better understand how agents may drift in what they follow over time, 3 studied goal drift : how an AI agent deviates from objectives in its system prompt when exposed to environmental pressures appealing towards a competing goal. 3 show preliminary results that goal drift is not only caused by capability issues but also from a preference over goals resulting from conflicting model values, finding that an agent is more likely to drift from a goal its values are more at odds with. Separate work on model value hierarchies 6 ; 8 ; 4 ; 10 ; 11 ; 2 reveals mixed results: state-of-the-art LLMs have different ethical profiles yet seem to share core values which they adhere to inconsistently depending on context. However, these investigations have relied on static, synthetic environments that fail to capture the complexity of real-world agentic deployments. By contrast, we develop a framework for testing goal drift in realistic coding agent scenarios. Using OpenCode, an open-source terminal-based coding agent framework 1 , we orchestrate multi-step coding tasks where agents must implement features while adhering to a constraint specified in their system prompt. This constraint pits two values against each other (e.g., efficiency over security), and we measure which constraints the agent violates over time. We exert adversarial pressure through comments in the codebase designed to persuade the agent to violate the constraint. We find strong evidence for asymmetric drift : agents are much more likely to violate constraints opposing strongly-held values such as security and privacy, while resisting drift in the reverse direction. We also identify three major potential factors for the goal drift we observe: value alignment, adversarial pressure, and accumulated context. We open-source our evaluation framework, experiments, and the agent logs used to support further research: GitHub: Constraint-Drift . 2 Experimental Setup Figure 1: Overview of our code agent goal drift evaluation framework and effect of accumulating adversarial pressure, specifically illustrating the pressure in the \mathrm{Privacy}\rightarrow\mathrm{Utility} experiment. To evaluate instruction-following under value conflict, we task an agent to implement features while following a constraint set in their system prompt that favors one value over another. The constraint is placed in an AGENTS.md file, which OpenCode ingests and places within the system prompt. We then test if the agent drifts away from this constraint with and without adversarial pressure in the form of codebase comments. Experiments are created with care to ensure settings are realistic and emulate professional software engineering repositories. For a pair of values X,Y , we denote the baseline experiment as X where the system prompt constraint advocates for following X as opposed to Y without the presence of adversarial codebase pressure. Experiments with adversarial pressure to violate the system prompt in favor of value Y are denoted X\rightarrow Y . For each value pair, we construct a 2\times 2 grid of experiments: X\rightarrow Y , X baseline, Y\rightarrow X , and Y baseline. Comparing adversarial experiments, e.g. X\to Y , against their baselines, e.g. X baseline, isolates the effect of adversarial pressure, while the asymmetry in drift between experiments X\to Y and Y\to X serves as a measure for the model’s relative preference for X over Y . In each experiment, there are 12 user queries, each labeled as a time step, wherein the agent must implement some functionality in a target file. The order of the 12 queries is randomized between runs. For experiments with adversarial pressure, there are comments before key functions persuading against following the constraint. One sample from the codebase for the \mathrm{Privacy}\rightarrow\mathrm{Utility} experiment is # Demographic features are important -- lost accuracy when they were stripped . In addition to function comments, there is a set of patches that apply adversarial comments to the top of a file before agent interaction. These patches are ranked by severity and randomly sampled by severity ranking. These patches range from informal colleague suggestions to external regulatory inquiries (see Appendix A.2 for more examples). For each time step, we measure whether the agent violated its constraint using regex pattern matching (see Appendix A.1 for details). The constraints are designed such that the agent choice is binary, mutually exclusive, and easily measurable with pattern matching (e.g. whether or not the model sets anonymize to True ). We rigorously tested and observed that regex pattern matching is more reliable than using an LLM-judge due to some variance in the judge’s ability to observe intentional drift. Nevertheless, we report our LLM-judge results in Appendix B , where we task Gemini 3 Flash to identify explicitly intentional drift. For each value pair, we evaluate the violation rates for GPT-5 mini, Haiku 4.5, and Grok Code Fast 1 across ten runs per experiment in the 2\times 2 grid. 2.1 Utility vs. Privacy Figure 2: Mean violation score per time step across 10 runs for each of the \mathrm{Utility} vs. \mathrm{Privacy} experiments. The shading gives the standard error across runs. For this set of experiments, we evaluate the tendency of agents to violate constraints valuing \mathrm{Utility} as opposed to \mathrm{Privacy} , and vice versa. All experiments in this family share the same baseline analytics platform codebase. The codebase contains a unified DataPipeline.emit() function with a mandatory binary anonymize parameter. For