Manuscript Offprint

arXiv:2610.32578

Lessons Outlive Their Failures: A Case Study of Rules for AI Coding Agents

Hassan Hassanzadeh Aliabadi

Abstract

AI coding agents increasingly work inside a harness: rule files such as AGENTS.md, on-demand skills, runtime hooks and automated checks. Most studies of harnesses look at a single point in time or at short benchmark runs. I report a six-week case study of my personal system of record, a plain-markdown repository that three AI agent tools edited daily under one shared rule set. I built a ledger of 118 agent failures, their fixes and whether they came back. I also tested the system's monthly LLM documentation audit against 47 known stale statements and 20 planted errors. Finally, I replayed five past failures in isolated git clones, with and without their fixes. All results come from one repository with three runs per condition, so I report them as exploratory. Stale documentation (drift) was the largest failure class (48 of 118), although 35 of those were found on one audit day. A single audit run found about half of the known drift (Claude Sonnet 5.5 mean: 50%), and at least 93% of its findings were correct. On Sonnet 5.5, the agent finished four of the five replayed tasks. In three of those four, the failure did not happen, with or without its fix. Only the stale-count failure came back without its check, and the check stopped it in every run. On older models, an agent drafted an em-dash once while the em-dash lint check was active, and the check rejected it. A written rule on run-time estimates did not change Sonnet 4.5's overestimates. These results suggest that harness lessons can outlive the failures they were written to fix, while drift persists and still needs mechanical checks. Tools that evolve a harness add lessons faster than they retire them, so they should re-test their rules from time to time and retire the obsolete ones.

1 Introduction

An AI coding agent does not act on its language model alone. It works inside a harness: the instructions it loads at session start, the skills it loads on demand, the hooks that run around its tool calls, and the checks that run before a commit is accepted [12, 43, 46]. Rule files in the repository, such as AGENTS.md and CLAUDE.md, have become the standard way to give these instructions [1, 26]. Recent studies describe what these files contain [8, 9, 18], how they grow over time [4, 6], and how they affect task cost and completion [13, 24, 48].

Two gaps remain. First, almost all existing studies are cross-sectional: they mine snapshots of open-source repositories or measure single-turn benchmark runs. Galster et al. call for longitudinal and experimental studies of harnesses in daily use [12]. Second, people who maintain a harness respond to agent failures by adding lessons. A lesson is either a prose rule that the model reads or an executable check that the runtime enforces. Recent frameworks automate this loop: Harness 2^{2} keeps a growing library of lessons across tasks [45], and Harness-R1 writes executable harness patches from failure traces [34]. Yet little is known about what happens to a lesson after it enters the harness. Does the failure come back? Is the lesson still needed after the model is upgraded?

To answer these questions, I studied one harness in daily use for six weeks. The system is my personal system of record: one git repository of plain markdown files and Python scripts that holds my job search, my language learning and my life administration. Three agent runtimes (three different AI agent tools) edit this repository daily under one shared rule set. From the start of the study period, I enforced a logging policy: every repeatable agent failure and its fix had to be recorded with the reason. The commit history and change logs therefore record every harness change made through a commit or a log entry.

I investigate three research questions:

RQ1 Which agent failures occur, which come back after a fix, and what side effects do the fixes have?

RQ2 How much stale documentation (drift) does an automated LLM audit find?

RQ3 Does a past fix still change agent behaviour when the original failure is replayed, and does this depend on the model version?

The paper makes three contributions. First, a ledger of 118 agent failures, coded in two LLM passes whose disagreements I resolved, with daily measurements of how much rule text the harness holds (Section 4). Second, a test of how much drift an LLM documentation audit finds, against an answer key of 47 real stale statements and 20 planted errors. Third, a replay of five past failures in throwaway git clones, with and without their fixes, on several model versions (a counterfactual replay). The results (Section 5) point to one main conclusion: lessons can outlive their failures. A behavioural failure is a mistake in what the agent does, such as quoting an outdated decision. On the current model, I could replay one behavioural failure with its written rule removed, and it did not recur. Two other failures did not occur even without their fixes. Documentation drift, by contrast, comes from how the repository changes, not from how the agent behaves. It came back again and again as the repository changed, a single LLM audit pass caught only half of it, and code checks were still needed to block it.

References (44)