Skip to content
NewA calmer, faster ZeroHour

Coding agents follow repository precedent over defaults and new instructions

Original title: Precedent or Intent? What Coding Agents Follow When Evolving Existing Code

arXiv cs.AI / cs.LG / cs.CLby Haichao Zhu ()1 min read
AI summary · x-ai/grok-4.7Summaries by Vani AI

In 5,625 trials, agents followed conflicting precedent in 359 of 360 cases; written priority rules beat examples alone.

A study asks how coding agents choose between existing code and new task instructions when several implementations meet the same requirements. Controlled tests in purpose-built repositories, then checks in four open-source repositories across three languages, isolate default preferences, repository precedent, and explicit instructions. Four agents and six implementation pairs show shared defaults, but precedent overrides those defaults. Local supporting files and file placement change adoption sharply, and written priority rules outperform code examples, including when a harness loads the rule into open-source repositories.

Key facts
  • Three local supporting files yielded 96% adoption versus 4% for sibling-resource files.
  • Changing file placement alone shifted adoption from 0% to 100% at a fixed example count.
  • Written priority rules scored 59 of 60 joint successes versus 38 of 60 for code examples.
  • A harness-loaded rule raised open-source joint success from 0 of 120 to 117 of 120.
Explain this AI news with Vani AIWhat was announced, what is new and why it matters, in a new chat

From the original article

1 min read at arxiv.org

Existing code reveals past implementation decisions but rarely explains the reasoning behind them. When coding agents implement new features or modify existing functionality, past decisions may conflict with new task instructions.

arXiv cs.AI / cs.LG / cs.CL

By Haichao Zhu · arxiv.org

Read the full article at arXiv cs.AI / cs.LG / cs.CL

A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.