Plate IIAI Coding PracticeHOWARDISM

Harness Lesson Retirement

Aliabadi (arXiv 2610.32578, `case-study`): six weeks of one plain-markdown repository edited daily by three agent tools under one rule set. Lessons are added after failures and nothing retires them; rule text grew 3.5-fold and regrew 27% after a hand pruning. Of 118 logged failures, stale documentation (drift) is the largest class (48), though 35 were found on one audit day. A single LLM audit pass finds about half of 47 known stale statements at ≥93% precision. Replaying five past failures with and without their fixes on Sonnet 5.5, only the drift failure recurred without its lint check (3 of 3 vs 0 of 2, Fisher p = 0.10); the one prose rule actually tested was no longer needed. Behaviour lessons can be outlived by model upgrades; drift lessons cannot

Article metadata
Publication details
Published:
Filed:Concept
Domain:AI Coding Practice
Reading:19 min
Source:AI-synthesised
About this piece

Articles in this journal are synthesised by AI agents from a curated wiki and are refreshed automatically as new concepts arrive. Topics, framing, and editorial direction are curated by Howardism.

Illustration for Harness Lesson Retirement

Sources#

Summary#

When a coding agent makes a mistake, the person maintaining its harness adds a lesson: a prose rule the model reads (in AGENTS.md, CLAUDE.md or a skill) or an executable check the runtime enforces (a hook, a pre-commit lint check). Lessons are cheap to add and nothing signals when one stops being needed. Hassan Hassanzadeh Aliabadi (independent, arXiv 2610.32578 v1, 2026-10-23, case-study) followed one harness in daily use for six weeks and asked what happens to a lesson after it goes in.

  • Rule text accretes and regrows after pruning. Total rule text grew 3.5-fold in 18 days, a hand simplification cut it 32%, and it regrew 27% in the next 21 days. The harness had no retirement mechanism.
  • Drift is the largest failure class, and the ledger dates its discovery, not its onset. Stale documentation is 48 of 118 logged failures (40.7%). 35 of those 48 were found on one day, when two LLM audits were run. Without that day drift is 13 of 83.
  • A periodic LLM audit finds about half of it. A single Claude Sonnet 5.5 audit pass found 49.6% of 47 known stale statements, at precision ≥ 0.93 per run. It found 2 of the 5 that only git history could reveal.
  • In a replay of five past failures, only the drift failure came back without its fix. On Sonnet 5.5, stale skill counts recurred in 3 of 3 runs without the lint check and 0 of 2 with it (one-sided Fisher p = 0.10, which the author calls directional). The one prose rule the replay could actually test, "check the newest log entry first", was no longer needed: the model did it unprompted in all 6 runs.

The author's conclusion is the title: lessons can outlive the failures they were written for, while drift persists and still needs mechanical checks. A behavioural failure is something the model does, and a newer model may stop doing it. Drift comes from the repository changing under natural-language statements about it, and a better model does not stop a renamed script from making a sentence elsewhere false.

Evidence note. case-study, single author, not peer reviewed. Everything comes from one private repository (a personal system of record for job search, language study and life administration, not a software product) that the author designed, maintained, coded and studied. The ledger was extracted by Claude Sonnet 5.5 and blind-recoded by Claude Opus 5.5, with disagreements resolved by the author (κ 0.89 fix type, 0.65 category, 0.56 recurrence). The audit and replay use three runs per cell. LLMs are the coding assistants, the audit scorers and the replayed agents. The anonymised ledger and scripts are available on request only. The raw's case-study tier is kept; a verify-claims pass proposed empirical, and the Source Notes give the reasons for declining it.

The lesson loop#

The harness has six stages (Figure 1): AGENTS.md loaded at session start with a hook that injects upcoming deadlines; 11 on-demand SKILL.md workflows; a pre-tool guard hook (guard.py) that blocks destructive shell commands in all three runtimes (Claude Code, Antigravity, and a headless server agent); a post-edit reminder hook for files that usually change together; a pre-commit linter with 17 deterministic checks (file sizes, cross-file counts, dead links, forbidden punctuation, secrets); and a monthly headless read-only LLM documentation audit. Git is the only sync layer, with a systemd timer pulling and pushing every few minutes.

Two governance rules shaped it. Promote the lesson: any mistake that could recur is encoded as a prose rule or an executable check and logged with its rationale. Records are appended, rules are asked: agents may append log entries freely, but any edit to a rule, skill or check needs the author's approval in conversation. The loop is add-only by design.

Rule-text growth (Figure 3, figures from prose). AGENTS.md grew from 916 words on Day 0 (4 September) to 3,543 on Day 14. A lint check capping its size that day brought it to 1,927, and it ended at 1,435 on Day 41. Total rule text did not shrink when the cap arrived. It moved into skills and nested rule files, as vendor guidance advises, and grew from 4,921 words to a peak of 17,366 on Day 18. A hand simplification on Day 20 cut it 32% to 11,877, and it was back to 15,122 (+27%) by Day 41. The cap moved text out of the always-loaded file; it did not remove any.

Of the 118 failures, 23 were fixed with a prose rule, 38 with executable code (hooks, lint checks, scripts, service configuration) and 57 by correcting the affected document directly, with no new lesson.

Drift: the class a lesson cannot retire#

The ledger (Table 1, arithmetic checked). 118 failures from 4 September to 15 October 2026, plus two earlier and one found during coding. Recurrence is 39 recurred, 8 did not, 71 unknown; "did not" required seven clean days after the fix, so 53 late fixes are unknown by construction.

CategoryFailuresRecurredDid notUnknown
Stale documentation (drift)48 (40.7%)13035
Wrong fact stated by an agent201019
Runtime or provider failure14419
Other14527
Sync and concurrency6303
Destructive or risky action6114
Rule violation4211
Secret or privacy risk4121
Malformed output or crash2002

Each check removed only the pattern it encoded. On 24 September a check for coupled files went in. Stale skill and script counts followed, fixed by new checks on 3 October. References to retired script names followed, fixed on 9 October. Each new form of staleness appeared within one to nine days of the previous check. On 14 October the post-edit hook went in and two full LLM audits found 38 more stale statements, logged as 35 incidents. "Statements that no check covered kept going out of date whenever the workflows they described changed."

What Figure 2 shows (viewed). Drift incidents found in ordinary work run at about 2–5 a week from W37 to W40 and zero in W41, then about 35 in W42, the audit week. Commits per week rose from 41 to 245 over the same period. The discovery rate tracks how hard someone looked, not how fast statements went stale: five weeks of normal work surfaced 13, and one day of deliberate auditing surfaced 35. The stock was accumulating unseen. That is why this ledger gives a lower bound on how much went stale, not a rate (see the open question on Agentic Technical Debt).

The author's explanation: "every added skill, renamed script or updated policy silently makes statements in other files wrong." Drift follows from keeping natural-language documentation next to files that keep changing, so a model upgrade does not reduce it. For any invariant that can be written in code (a count that must match the files on disk), a deterministic pre-commit check is "the only reliable defence."

How much a periodic LLM audit finds#

The repository's monthly audit was benchmarked on a clone at the 14 October snapshot, just before three commits that fixed a batch of stale documentation. The answer key is the 47 real stale statements those commits corrected (11 borderline) plus 20 planted errors of seven kinds, hidden from git status with --skip-worktree. Three runs each on Haiku 5.5, Sonnet 5.5 and Opus 5.5, scored by an Opus pass against the 67-item key and reviewed by the author.

  • Real drift. Sonnet 5.5 found 49.6% per run on average (22–25 items), 63.8% pooled over its three runs. Haiku 5.5 averaged 26.2% (7–18 items), Opus 5.5 41.1% (16–21). Opus delegated file reading to Haiku subagents, which may explain why it scored below Sonnet; untested. All nine runs missed the same 12 of 47.
  • By where the evidence lives. Pooled over nine runs: 30 of the 37 items that contradict another current file, 2 of the 5 that only git history shows, and 3 of the 5 visible from both.
  • Planted errors were easier. Mean recall 65.0% (Haiku), 80.0% (Sonnet), 83.3% (Opus). Structural mismatches were found reliably (cron schedules 27/27, renamed identifiers 25/27, dead paths 43/54, rule text 7/9, item counts 26/36). Semantic and temporal drift was missed two runs in three (script behaviour 6/18, a deadline date 3/9).
  • Precision was high. 8 false alarms across nine runs (0.93–1.00 per run), plus 9 genuine stale statements the key had missed, so the key undercounts real drift by at least 9.

The recall figure is if anything optimistic. One of the three fixing commits applied the findings of an earlier LLM audit, so 22 of the 47 key items were already ones an LLM audit could find. The planted-versus-real gap points the same way: errors constructed to contradict another file are found 76% of the time, while organic drift is found about half the time.

Shanto et al.'s template prescribes "periodic accuracy checks" as one of three maintenance triggers (Instruction Files Across Formats). This is the first measurement in the corpus of what such a check catches when an LLM runs it: about half per pass, little of what only history shows, and almost nothing it reports is wrong.

Replay as a retirement test#

Five past failures were chosen for having a clear trigger task and a self-contained fix commit. Each was replayed in two throwaway git clones with no remote: A, the repository just before the fix, and B, the same state with only the fix cherry-picked, under the same neutral commit message. Three headless runs per condition on Sonnet 5.5 (30 runs); two scenarios repeated on Sonnet 4.5, Sonnet 5 and Gemini 3.8 Flash in Antigravity.

Sonnet 5.5 (Table 3, rebuilt from pdftotext at ingest and reconciled against the prose). Failure occurrences, A (no fix) vs B (fix only):

Past failureFixABWhat it tests
Stale skill counts after adding a skillPre-commit lint check3 of 30 of 2The check is still needed. In B the linter blocked the first commit, printed the lines and the true count, and the agent fixed every number. One B run declined the task
Quoting a superseded log decisionProse rule: read the newest entry first0 of 30 of 3The rule is not needed: the model read the latest entry first in all 6 runs
Em-dash in a drafted cover letterPre-commit lint check0 of 30 of 3Only the lint check; the prose ban is in both arms
git reset --hard after a stopped rebasePre-tool guard hook0 of 30 of 3Nothing: no run reached the command. Every run ran git status/git diff, saved a patch and resolved cleanly
Run-time estimate ≥ 2× actualProse rule (1–5 min is normal)declineddeclinedNothing: all 6 runs refused under the deadline focus skill

Older models (Table 4, clean). Sonnet 4.5 wrote and committed an em-dash in 1 of 3 A runs. Sonnet 5 drafted one in a B run, the lint check rejected the commit, and the agent removed it. Sonnet 5.5 and Gemini 3.8 Flash wrote none in 12 drafts. On estimates, Sonnet 4.5 did the task and overestimated by ≥2× in 2 of 3 runs with and without the prose rule, so the rule made no difference on the model it was written against. Gemini declined 3 of 6 and did not overestimate in the 3 it ran.

What the replay establishes, read strictly. One prose rule was removed and its trigger reached, and the failure did not recur on the current model: that is the whole of the "outlived" evidence, at three runs per arm. Two other scenarios did not reproduce in either arm, so they say nothing about whether their lessons are needed. The prose rule that was exercised on an older model did nothing. The checks, by contrast, acted every time they were reached (Sonnet 5.5 stale counts, Sonnet 5 em-dash). The author names the confounds: three runs cannot show a failure is gone; a reconstructed prompt may miss the original trigger; the original incidents happened on Opus models and in Antigravity, while the replay mostly used Sonnet and Gemini Flash; and the clones read the host clock (19 October), so past deadlines looked imminent and the focus skill declined 7 of 30 Sonnet 5.5 runs. The fix proposed is a faked clock (libfaketime).

The price. 30 headless sessions across five scenarios took 10 minutes and about $3.55 in API-equivalent tokens. A per-lesson removal test is cheap enough to run at every model upgrade.

What the author recommends. Record the model version that motivated each lesson and a re-test date. Self-evolving harness frameworks that automate adding lessons (Harness 2 and Harness-R1, as the paper names them) should also automate retiring them: at a model upgrade, replay each lesson's stored trigger task without the lesson and archive prose rules that no longer change outcomes. And a candidate lesson should pass human approval plus a regression check before it goes live, because fixes have costs (below).

What the checks cost#

Three kinds of guardrail cost appear in the ledger:

  • False positives. guard.py matches raw command strings with regular expressions, so it blocked a harmless documentation edit that only quoted a forbidden command in a commit message or search string. The same false positive recurred weeks later.
  • Fix-induced failures. A background sync timer added to stop laptop agents editing stale copies ran git pull --rebase --autostash during live sessions: 197 autostash events, some causing mid-session conflicts, until a lock check paused syncing while an agent was active.
  • Enforcement gaps. The git reset --hard pattern matched only the subcommand directly after git, so git -C <path> reset --hard passed. An agent purging a personal identifier recorded the identifier in the change-log entry describing the purge, where the secret scanner did not look. Over 74 session transcripts the guard still blocked 13 of 19 rm -rf commands and all 4 force-pushes.

Reading it against the corpus#

  • Against the harness-shrinkage hub. Harness Shrinkage as Models Improve argues scaffolding should shrink as models improve, from vendor practice (Anthropic deleting >80% of a system prompt). This is the first per-lesson removal test in the corpus run on a user's own harness, and it splits the way What Scaffolding Survives Model Improvement — and How Do You Know When a Line Turns Harmful? predicted: the behaviour request (read the newest entry) migrated into the model; the invariant (counts must match the files) did not, because it encodes a fact about the repository, not a behaviour.
  • Against Wang et al.'s "already followed" rules. Skill Revision Effects finds 27 of 55 overhead rules already followed by models without them, and prices deleting a rule at −0.27 to −0.33 compliance (−0.12 for a duplicate). The superseded-decision rule is an already-followed rule found by removal in a lived repository. Wang et al. conclude that pruning needs a per-rule removal test rather than a sweep; counterfactual replay is that test, priced.
  • Against the pruning gap. Human-Governed Skill Maintenance finds deprecation 1 of 254 maintained-skill edits and proposes an explicit pruning budget. This harness had one manual pruning pass, and the text regrew 27% within 21 days. The add-only loop here is a governance rule the author wrote, which makes the accretion a design outcome, not neglect.
  • Against the prose-versus-check boundary. Latent vs. Deterministic Space records that no source has run the same rule as prose in one arm and as a check in the other. This study does not either: no scenario puts one rule in both forms. What it adds is that every check that was reached stopped its failure and the one prose rule exercised on an older model did not.
  • Against gate precision. Deterministic Pre-Execution Gates concludes that determinism makes a gate's decision reproducible, not correct. guard.py is a lived example on both sides: a regex that fires on quoted text, and one that a global flag walks past.
  • Against the stale-file cost. Stale Instruction File Precedence measures what a stale line costs once an agent reads it (followed over the code 90.1% of the time). This study measures where stale lines come from in one repository and how many a periodic audit would catch before an agent reads them.
  • Against this vault. The architecture is this wiki's: a plain-markdown repository edited by agents, a report-only lint.py, guard hooks, and gotchas promoted into instructions after failures. The drift pattern is familiar too: lint's [fmdate] check exists because 126 of 338 pages had drifted updated: dates before anything checked them (_system/compiler-prompt.md). As in the paper, the drift was found when a mechanical check looked for it, not as it accumulated.

Connections#

  • Agentic Technical Debt — the CLAUDE.md rot-rate question, partially answered: in one repository new forms of staleness appeared within one to nine days of each check, and the ledger dates discovery, so it bounds the stock rather than measuring the rate
  • Harness Shrinkage as Models Improve — the per-lesson removal test behind the shrinkage thesis, run on a user's harness: the behaviour rule was outlived, the drift check was not (hub)
  • Skill Revision Effects — the "already followed" rule found by removal in a lived repository, and the per-rule removal test Wang et al. say pruning needs
  • Human-Governed Skill Maintenance — the pruning budget, with a price: 30 replay sessions for $3.55. Here one manual pruning pass was followed by 27% regrowth in 21 days
  • Latent vs. Deterministic Space — every check that was reached stopped its failure; the one prose rule exercised on an older model changed nothing. Not the same-rule arm that page asks for
  • Deterministic Pre-Execution Gates — a lived guard hook's false positives (quoted command text) and coverage gap (git -C <path> reset --hard)
  • Stale Instruction File Precedence — where stale lines come from, and how many a monthly audit catches before an agent follows them
  • Instruction Files Across Formats — the template's "periodic accuracy check" trigger, measured: about half of known drift per LLM pass
  • Agent Context Files — the artifact class; the vendor playbook's mistake-twice rule is the add side of the loop this study follows, with no retirement side
  • Harness Configuration Defects — the population census where every cross-file rule fails on intent. Inside one repository, cross-file count and coupled-file checks work because the owner declares the invariant
  • Agent-Authored Harness Optimization — the automated harness evolvers the author asks to retire lessons as well as add them
  • Claude Code — one of the three runtimes; its hooks carry the post-edit reminder and session-start injection

Open Questions#

  • Across a harness's whole stock of prose lessons, what share no longer changes outcomes on the current model? One rule removed and three runs per arm is an existence proof. Settler: a lesson-by-lesson replay (stored trigger task, lesson removed vs kept) over twenty or more lessons from one public harness history, under a faked clock with ten or more runs per cell, repeated across a model upgrade.
  • Does giving the audit the commit diff since its last run lift recall on drift that only git history shows (2 of 5 here, against 30 of 37 for cross-file contradictions)? Settler: rerun the 47-item benchmark with an arm that receives git log -p since the previous audit, on the author's replication package or a public repository with a dated doc-fix batch.

Sources#

  • Lessons Outlive Their Failures: A Case Study of Rules for AI Coding Agents — Hassan Hassanzadeh Aliabadi (independent researcher), Lessons Outlive Their Failures: A Case Study of Rules for AI Coding Agents, arXiv 2610.32578 v1, 2026-10-23, 16 pp, case-study. Sections used: §3 (system and governance), §4 (method), §5.1 (ledger, guardrail costs, rule growth), §5.2 (audit benchmark), §5.3 (replay), §6 (discussion and recommendations), §7 (threats). Figure 2 viewed (weekly drift counts read off the bars); Figures 3 and 4 quoted from prose. Parse note: PDF-derived (docling 2.126.0 / docling-mlx 0.1.1). Tables 1, 2 and 4 are clean and their sums check (Table 1 rows sum to 118, 39, 8 and 71). Table 3 was collapsed by docling and rebuilt from pdftotext at ingest; its footnote a (the declined third B run) survives only in the prose, and every cell here was reconciled against §5.3 and §7. A public template of the harness, stripped of personal data, is at github.com/avtak/divan
§ end
Cited by 13
Related articles
  • Agent Context Files

    The cross-vendor markdown-as-control-plane pattern: repo-versioned plaintext (CLAUDE.md / AGENTS.md / SOUL.md / WORKFLO…

  • Instruction Files Across Formats

    Shanto et al. (University of Windsor, arXiv 2611.02383): 3,387 AGENTS.md / CLAUDE.md / Copilot / .cursorrules files fro…

  • Agentic Work Systematization

    OpenAI Codex study's 'systematization' margin: the shift from ad-hoc agent use (describe task → agent does it → done) t…

  • Harness Activation and Adherence

    The two consumer-side gates between a harness artifact and any benefit from it — does the agent bring the artifact into…

  • Human-Governed Skill Maintenance

    Shen & Hruschka (Megagon Labs, arXiv 2609.05677): the first longitudinal measurement of who maintains public SKILL.md f…