# Decision records for coding agents · Oxagen Research

Source: https://oxagen.sh/blog/decision-records-for-coding-agents

[Research](https://oxagen.sh/blog) · [Coding agents](https://oxagen.sh/blog/pillars/coding-agents)

# Decision records for coding agents

Decision records for coding agents stop each run from reopening a settled choice. How to write them, put them where agents read them, and retire them.

Oxagen Research · November 30, 2026 · 8 min read

*   [Coding agents](https://oxagen.sh/blog/pillars/coding-agents)
*   [Autonomous agents](https://oxagen.sh/blog/pillars/autonomous-agents)

On Tuesday three agents opened three pull requests. Each one moved the billing jobs onto a message broker. Your team turned that broker down twice, and the reasons sit in a Slack thread from 2024 that nobody can find.

Decision records for coding agents are short files that each state one design choice, why the team made it, and whether it still holds. Kept where every agent reads them before it edits code, they stop an agent from reopening a question the team already settled.

Each of those three agents read the code, found a homemade job queue, and did what a careful newcomer would do. Each proposed replacing it. Nothing in the agent's context said the queue was a choice.

## What a decision record holds

Michael Nygard named the format in 2011.[1](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fn-1) An architecture decision record, or ADR, is a short text file about one decision. It has five parts: a title, the context and the forces in tension, the decision in active voice, a status, and the consequences, good and bad. Nygard kept each one to a page or two.

He wrote it for a new teammate. Without the reasons behind a past decision, he wrote, a newcomer has two choices: blindly accept it or blindly change it. A coding agent is a new teammate on every run. Each Claude Code session begins with a fresh context window,[2](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fn-2) so the agent meets your codebase the way a new hire does on day one, many times a day.

The status field matters most to an agent, because it says whether a record binds. Nygard's statuses are proposed, accepted, deprecated, and superseded. MADR, the Markdown template many teams use for ADRs, adds rejected and names the record that replaced a superseded one.[3](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fn-3)

## Why coding agents repeat the same mistakes

Agents fail with decision records in two opposite ways.

The first is the one in the opening. The agent never sees the reasoning, so it argues the settled question again. Tian Pan describes teams that run several sessions at once and get the same rejected design in three pull requests in one week.[4](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fn-4) The reasoning lived in a chat thread that expired, or with an engineer who left. Every session starts from zero.

The second shows up once a record does reach the agent. Duncan Davidson watched an agent keep an outdated storage layer in a new feature because an ADR still called it mandatory.[5](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fn-5) The agent did not raise the conflict. It added another layer so the new work fit the old ruling. "Once a decision enters an agent's context window," he writes, "the agent may adhere to it even more rigidly than a human would."

A 2026 study measured that second failure.[6](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fn-6) Xiaonan Xu and Wenjing Wu built 40 small Python projects where the instruction file asked for one convention and the code used another, such as `print` against a logger. They ran Claude Code and Codex CLI on each project, 320 runs in all. Without help, 90.1 percent of the agents' choices followed the stale file. Claude Code pointed out the conflict in 79 of 80 runs and followed the file anyway. Codex rewrote existing code to match the file in 20 of 80 runs, and the project's tests broke in 17 of those. One added sentence in the user-level instruction file gave the code precedence. It raised the share of choices that followed the code from 4.2 to 91.4 percent and the test pass rate from 89.4 to 100 percent.

Agents given a stale instruction file, without and with one added sentence

|  | Without the sentence | With the sentence |
| --- | --- | --- |
| Choices that followed the code | 4.2% | 91.4% |
| Test pass rate | 89.4% | 100% |

Source: Xu and Wu (2026), 320 runs of Claude Code and Codex CLI on 40 Python projects. The added sentence sits in the user-level instruction file and tells the agent to trust the code when the two disagree.

The authors trace both results to how each source arrives. The instruction file reaches the model as an instruction. The code reaches it as tool output, which models are trained to weigh less. So a decision record helps only while it is current. A stale one is worse than none, because the agent obeys it.

## How teams wire ADRs into AGENTS.md by hand

Practitioners have settled on three moves, which Pan lists:[4](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fn-4)

1.  Put one line in `AGENTS.md` or `CLAUDE.md` that points at `docs/adr/`.
2.  Copy each binding decision into that file as a one-line rule, such as "Keep the monolith (ADR-0012)."
3.  Leave a comment at the odd spot in the code, such as `// intentionally synchronous, see ADR-0031`.

Davidson adds rules for how the agent treats the records.[5](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fn-5) Accepted ADRs bind the agent, and proposed ones are context only. When a task conflicts with an accepted ADR, the agent stops and asks whether the task or the record should change. Each record carries only the ruling in force today, and Git keeps its history.

These moves work. Each one also has a limit that a team hits as it grows.

*   **The pointer line asks the agent to go and read.** Nothing makes it. Pan's point is that a folder the agent never opens is as useful as the expired thread.
*   **The one-line rules are a second copy of each decision.** When a pull request reverses the monolith decision, someone has to find the line in every repository's instruction file. Pan suggests rechecking those lines every quarter.
*   **The instruction file has a size limit.** Claude Code's documentation asks for under 200 lines per `CLAUDE.md`, and Codex stops reading project files at 32 KiB by default.[2](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fn-2)[7](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fn-7) The guide to [AGENTS.md for teams](https://oxagen.sh/blog/agents-md-for-teams) covers those limits and what to cut.

## Keeping coding agents consistent across a codebase

All three limits have one fix. Tie each decision to the code it covers, and hand it to the agent when it touches that code.

Oxagen's code graph does the first half for the ADRs a team already keeps.[8](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fn-8) For each repository whose code graph Oxagen builds, it finds ADRs in folders such as `docs/adr/` and `docs/decisions/`, and in files whose first heading reads like `ADR-049: Name`. It reads the MADR, log4brains, and adr-tools formats. Each ADR becomes a decision node with links to what it names. A file path or code name in the text links to a file, package, table, or function when exactly one matches. An ADR that states no status is read as proposed, so the import never claims a team accepted something it did not write down.

How an imported ADR links to the code it covers

*   Decision recordgovernsLinked when the ADR names exactly one matchFile, package, table, or function
*   Decision recordsupersedesRead from the ADR's own textDecision record
*   Agentasks list\_governing\_decisions aboutAccepted decisions come firstOnly repositories the caller can readA file or a function

Oxagen's code graph, for a repository whose graph it builds. An ADR with no stated status is read as proposed.

An agent about to change `billing/queue.ts` can call the MCP tool `list_governing_decisions` on that file. The answer lists each decision that covers the file or the package that holds it, with its status and title, accepted decisions first. A decision from a repository the caller cannot read never appears. That is the pull half: the agent still has to ask.

## How Oxagen records the decisions agents run into

New decisions are the harder case. They come up in the middle of a run. The agent either picks one quietly or leaves the question in its last message for someone to find.

Stella, the assistant in the Oxagen app, reads each run that ends.[9](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fn-9) It reads runs that Oxagen recorded, in workspaces where Run summaries is Always (the default). When the agent's closing message lists choices it left to a person, under a label such as **Decisions for you**, Stella asks each one on the run's card. **Record the decision** offers two to four options, with Stella's suggestion first and marked Recommended. Each option says what happens next: file a work item, start an agent run, draft a steering record, or nothing more. When the run worked a tracked work item, your answer is posted on its issue.

The Console on a phone, with illustrative data. The front card is a Decision card: an agent waits for approval to push to release/4.11, which a rule routed to the person. The pager reads 1 of 5, and a second approval, to run the staging migration, waits behind it.

A Decision card at the front of the Console on a phone

A steering record is a short, reviewed instruction that Oxagen delivers to agents. It takes effect when its file changes on the steering repository's production branch, normally through a merged pull request. Before the merge, checks compare it with the records already in force and flag one that repeats an active record or requires what another forbids. After the merge, each run of Claude Code, Codex, Cursor, or Stella that Oxagen wraps gets the record at session start, up to the harness's text limit. The run's record lists which records it received and which it cut. Records also come from corrections people keep typing, which [steering drafted from corrections](https://oxagen.sh/blog/steering-drafted-from-corrections) describes.

How a decision an agent left open reaches every later run

1.  Run endsThe agent's last message lists a choice it left for a person.
2.  Stella asksThe run's card asks the question with two to four options.
3.  You recordYou pick the option that drafts a steering record, then edit its text.
4.  ChecksThe steering pull request is compared with the records in force.
5.  MergeA reviewer merges it, and the record takes effect.
6.  Next runEach wrapped run in the record's scope gets it at session start, if it fits.

| Stage | Job queue after the stage |
| --- | --- |
| Run ends | listed |
| Stella asks | asked |
| You record | drafted |
| Checks | checked |
| Merge | in force |
| Next run | delivered |

For runs Oxagen wraps. Stella asks only about a choice the run named, so a choice an agent made without saying so never reaches this path. Each harness takes a limited amount of start text, so a record that does not fit is cut.

The loop closes when the question comes back. When a later agent asks something one of your records answers, the card offers that record's answer as choice A and names the record. With **Answer from my rules** switched on, Stella sends the record's own sentences to an agent that asked in a progress update, without waiting for you.

Stella reads what the run wrote, so a choice the agent made without mentioning it leaves no question to raise. The same card carries the TODOs and failed checks a run leaves behind, which [tracking unfinished work across coding agent sessions](https://oxagen.sh/blog/track-unfinished-work-across-coding-agent-sessions) covers.

## Retiring a decision before it misleads

Xu and Wu's numbers make the last rule plain: an agent obeys a record nobody retired.[6](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fn-6) Pan puts it more bluntly: "an authoritative record of a decision you've since un-decided is worse than no record at all."[4](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fn-4)

Three habits keep decision records current.

1.  **Replace a record instead of rewriting it.** Mark the old one superseded and link the new one, as Nygard and MADR both do.
2.  **Reverse the decision and its rules in one pull request.** A reversal that leaves the one-line rule behind teaches every agent the old answer.
3.  **Give a record an end date when the decision has one.** A framework pinned for an audit can say when the audit ends, and someone retires the record that day.

Oxagen applies the first habit to steering records. A new version goes into force when its file changes on the steering repository's production branch, usually through a merged pull request. The newest version replaces the old one in every later run. The second habit stays with you, because the ADR lives in your code repository and the one-line rule in the steering repository. Oxagen has no field for a future end date. Retiring or superseding a record sets its end date to that moment, and a record past its end date no longer reaches runs.

The steering record Read CHANGELOG.md once per run, with illustrative data. Its statement tells agents not to re-read the file after the first read in a run. Pull request #42, with six of six checks passed and one approval, would change it, and the side column lists the three agents it reaches.

A steering record and the pull request that changes it

An imported ADR does not reach the start of a run

Each steering record carries a force: `must`, `should`, `may`, or `info`. Oxagen gives an imported ADR's steering copy the `info` force, and session start delivers only `must`, `should`, and `may` records. An agent learns that an ADR governs a file only when it asks, as with `list_governing_decisions`, and then reads the ADR. The one-line rule that carries the decision, written as a steering record with a `must` or `should` force, reaches wrapped runs at session start when it fits the harness's limit. Keep both: the ADR for the reasons, the record for the rule.

Why a reviewed record beats a longer prompt file is the subject of [what an agent should be told before it starts](https://oxagen.sh/blog/what-an-agent-should-be-told-before-it-starts). [Decision records in Oxagen](https://oxagen.sh/product/mandates/steering) shows how approved decisions reach every run, and [mandates for coding agents](https://oxagen.sh/product/mandates) shows where steering sits beside an agent's tools, budget, and approvals. The [Stella page docs](https://docs.oxagen.sh/docs/stella-page) list every option a decision card offers.

## References

1.  Nygard, M. (2011). _Documenting Architecture Decisions_. Cognitect blog. [https://www.cognitect.com/blog/2011/11/15/documenting-architecture-decisions](https://www.cognitect.com/blog/2011/11/15/documenting-architecture-decisions) [↩](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fnref-1)
    
2.  Anthropic (2026). _How Claude remembers your project_. Claude Code documentation. [https://code.claude.com/docs/en/memory](https://code.claude.com/docs/en/memory) [↩](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fnref-2) [↩2](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fnref-2-2)
    
3.  MADR project (2024). _About MADR_, version 4.0.0. [https://adr.github.io/madr/](https://adr.github.io/madr/) [↩](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fnref-3)
    
4.  Pan, T. (2026). _The ADR Your Agent Never Read_. TianPan.co. [https://tianpan.co/blog/2026-07-02-the-adr-your-agent-never-read](https://tianpan.co/blog/2026-07-02-the-adr-your-agent-never-read) [↩](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fnref-4) [↩2](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fnref-4-2) [↩3](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fnref-4-3)
    
5.  Davidson, J. D. (2026). _Coding agents love decision records_. duncandavidson.com. [https://duncandavidson.com/agents-love-decisions](https://duncandavidson.com/agents-love-decisions) [↩](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fnref-5) [↩2](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fnref-5-2)
    
6.  Xu, X., & Wu, W. (2026). _Stale Instruction Files Override the Code in Coding Agents: A One-Sentence Fix_. arXiv preprint, submitted to SN Computer Science. [https://arxiv.org/abs/2610.30571](https://arxiv.org/abs/2610.30571) [↩](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fnref-6) [↩2](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fnref-6-2)
    
7.  OpenAI (2026). _Custom instructions with AGENTS.md_. Codex documentation. [https://developers.openai.com/codex/guides/agents-md](https://developers.openai.com/codex/guides/agents-md) [↩](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fnref-7)
    
8.  Oxagen (2026). _MCP tools_, `list_governing_decisions`. Oxagen documentation. [https://docs.oxagen.sh/docs/mcp/tools](https://docs.oxagen.sh/docs/mcp/tools). [↩](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fnref-8)
    
9.  Oxagen (2026). _The Stella page_. Oxagen documentation. [https://docs.oxagen.sh/docs/stella-page](https://docs.oxagen.sh/docs/stella-page) [↩](https://oxagen.sh/blog/decision-records-for-coding-agents#user-content-fnref-9)
