Agentic Coding Needs Governance, Not Just Autonomy

AI use in engineering has grown faster than the controls around it. Google's DORA research found that 90% of technology professionals now use AI at work. In the same period, distrust of AI output among developers rose from 31% to 46%, according to the Stack Overflow Developer Survey.
That gap matters because AI coding agents do more than suggest the next line. They read files, edit code, run tests, and open pull requests. When they get your architecture wrong, the mistake is already in the branch.
We measured that risk on real enterprise codebases. The results are in The AI Coding Drift Report. This article explains what agentic coding is, where it works, where it drifts, and what governed execution looks like in practice.
Key Takeaways
- Agentic coding means AI agents that plan and carry out multi-step coding tasks, not just suggest the next line.
- Agents do well on bounded tasks. On large enterprise codebases, agents without org context read a median of 10 tokens for every token of accepted code.
- Without org context, agents scored 55-59% on domain accuracy and 61-69% on code consistency. With context: 92% and 97%, at about half the compute (0.56×).
- Governance must occur at the moment code is written, not wait for review.
What is Agentic Coding?
Agentic coding is software work where an AI agent plans and carries out a multi-step coding task with limited human input. The agent reads the codebase, decides what to change, writes the code, runs the tests, and keeps going until the task is done.
Code suggestions work one line at a time. A developer types, the model suggests, the developer accepts or rejects. An agent works one task at a time. It gets a goal, such as add an audit field to the booking service, and decides the steps on its own.
That shift moves the human from author to reviewer. It also moves the risk. The quality of the result now depends on what the agent knew before it made decisions.
What are Agentic Workflows?
Agentic workflows are the multi-step loops an agent runs to finish a task. At each step, the agent chooses its next action from the result of the step before it. A typical loop looks like this:
- Plan. Break the goal into steps.
- Retrieve. Search files, read code, and read docs to learn how the system works.
- Write. Generate or edit code.
- Test. Run the build and the tests.
- Revise. Read the failures, adjust, and repeat.
The loop is powerful because it can correct itself against tests. Most of the cost and drift come from this source. The retrieve step decides what the agent believes about your system. If it retrieves the wrong thing, or not enough, every later step inherits the error.
Where Agentic Coding Works
Agentic coding works best on bounded, well-specified tasks with a clear test for done. Writing unit tests for an existing function. Updating a dependency. Refactoring inside one module. Fixing a bug with a failing test that reproduces it.
These tasks share three traits. The scope is small enough to fit in the agent's working memory. The important rules are visible in the files the agent opens. And the tests tell the agent, clearly, when it has finished.
Gartner reports 2-3x throughput gains from coding agents on bounded tasks, and only small gains on architecture and cross-system work. The AI Coding Drift Report reaches the same point: the gains on bounded tasks do not carry over to work that spans systems. Cross-system work depends on knowledge that is not in the files the agent happens to open.
Where it Drifts: What 15 Enterprise Codebases Showed
On mature enterprise codebases, agents without org context spend most of their time reading, yet still get the domain wrong four times in ten.
For the AI Coding Drift Report, we ran agents against 15 enterprise codebases in aviation, banking, defense, and software services. The codebases were 15 to 20 years old, over a million lines each, and written mainly in Ada, C++, and COBOL. Each setup got the same tasks, prompts, and graders. Only the handover changed: one set of agents started with the team's context, the other started cold.

The 10:1 Reading Tax
The agents without context read a median of 10 tokens for every token of accepted code.
Think of a capable engineer who joins on Monday with no handover. No architecture walkthrough, no list of approved libraries, no one to ask. They can still do the work. But first they read: the folder structure, the build scripts, a dozen similar files, the tests. They piece together how the team builds software.
An agent does the same on every task. Then the task ends and it forgets. The next task starts from zero, and the reading starts again. That is the tax: paid in compute, in latency, and in engineer time spent waiting.
Right Only 55-59% of the Time
Reading everything did not make the agents right. Domain accuracy without context was 55--59%.
The agents read everything they could find. Where the codebase did not spell out the answer, they guessed. And they guessed from defaults learned on public code: the common library, the common pattern, the common naming. In a 20-year-old aviation or banking system, the common answer is often the wrong one.
One Answer in Three Comes Back Different
Code consistency without context was 61-69%. Roughly one answer in three differed when we asked the same task again.
Ask on a different day, or through a different engineer, and the agent produces a different version of the same thing. Each version may pass its tests. Together, they create drift: three ways to call the same service, two error-handling patterns, a duplicate utility that already exists.
Four Ways Agentic Coding Goes Almost Right
Most agent output is not obviously broken. It is almost-right output, which is harder to catch. In the 2025 Stack Overflow Developer Survey, 66% of developers named almost-right but not quite AI output as a frustration. The report groups the causes into four patterns.
1. Ungoverned usage: Each engineer runs agents their own way, with their own prompts and instruction files. Standards exist, but nothing enforces them when code is written. Only 35% of developers say agents always follow company standards.
2. Library imprecision: Asked for a chart, parser, or retry policy, the agent grabs the popular public option or writes a new one, instead of the internal library the team already approved. The result is duplication. Duplicated code blocks rose about eightfold in 2024.
3. Outdated instructions and files: Agents look at what they find. This includes the wiki page from 2019 and the instruction file. No one updated the file after the migration. Stale context creates confident, consistent, wrong code. 43% of engineering leaders say giving agents the right codebase context remains a major gap.
4. Approved, then rejected. The pull request passes review because it looks right. It fails later in integration, QA, or production because it broke a rule the reviewer could not see. 45% of developers say debugging AI-generated code takes longer. Review cannot catch what reviewers do not know to look for.
What Governed Agentic Workflows Look Like
Governed agentic workflows create software that fits your architecture from the start. This means you can review the work instead of rebuilding it. This is AI governance in engineering at the point where code is written. The report identifies five practices behind that result. Each one closes a specific failure mode.
- A persistent context layer. Architecture, approved libraries, rules, and business needs are captured once and carried from task to task. Prevents: the 10:1 reading tax, because the agent stops relearning your system on every run.
- Precise retrieval. The agent gets the slice of context the task needs, built before the model is called, not the whole codebase. Prevents: library imprecision, and the guessing that fills gaps with public-code defaults.
- Standards enforced at generation. Rules apply while code is written, not after review. Prevents: ungoverned usage and different answers to the same request.
- An audit trail. Every request, the context used, and the result are recorded and traceable. Prevents: approved-then-rejected work that nobody can trace to its cause.
- An owner for the context. One or two named architects curate what goes into the layer and settle conflicts when sources disagree. Prevents: outdated instructions and files that quietly steer the agent wrong.
In practice, this changes what arrives at review. The pull request uses the approved library, follows the house error-handling pattern, and respects the service boundaries, because the agent knew them before it started.
DesignVerse is one example of this method. It creates software within your current setup. The context layer and audit trail operate within your own infrastructure. In the benchmark, agents working with team context reached 92% domain accuracy and 97% code consistency at 0.56× the compute.
How to Test it on Your Own Codebase
You can measure drift on your own code in two weeks. The report sets out a five-step test:
- Pick one module. Choose a real, mature module with known rules and an owner who can judge the output. Avoid greenfield code; drift appears where history exists.
- Set a baseline. Run your current agent setup on a fixed set of real backlog tasks. Log tokens read, tokens accepted, and whether the result passed review and QA.
- Sandbox the alternative. Run the same tasks, with the same prompts, through a setup that carries org context. Keep it isolated from production.
- Score both. Use the same graders for both runs. Score domain accuracy, code consistency across repeated runs, and the read-to-accepted token ratio.
- Compare. Put the numbers side by side, then estimate what drift costs your team at your scale.
The one rule that matters: change only the handover. Same tasks, same prompts, same graders. Otherwise you are measuring something else.
Conclusion
The model is not the bottleneck. On the same tasks, with the same prompts, the gap between 55% and 92% domain accuracy came from one thing: what the agent knew about the organization before it started.
A better-informed agent beats a bigger one. It reads less, guesses less, and gives the same answer twice. That is what lets teams give AI agents in software development more autonomy on real codebases: governance first, then autonomy.
The full benchmark, method, and the five practices are in The AI Coding Drift Report. Get the report to see how your codebase compares.

FAQs
Why does agentic coding need governance if agents can run tests and revise their own work?
Tests help agents self-correct, but they do not teach the agent the team's architecture, approved libraries, service boundaries, or business rules. The article argues that the retrieve step shapes what the agent believes about the system. If the agent retrieves stale, incomplete, or irrelevant context, it may still produce code that passes local tests while drifting from company standards or failing later in integration, QA, or production.
What is the main difference between a coding assistant and an agentic coding workflow?
A coding assistant usually suggests code for a human to accept or reject, often one line or small block at a time. An agentic workflow gives the AI a goal and lets it plan, retrieve context, write code, run tests, and revise with limited human input. That changes the human role from author to reviewer and makes the agent's first context much more important.
Why did team context improve both accuracy and compute usage in the benchmark?
Team context reduced the need for agents to relearn the system on every task. Without that context, agents read a median of 10 tokens for each token of accepted code. They still guessed from public-code defaults when the answer was not clear. With the right context before generation, agents read less, guessed less, and matched the domain and the team's rules better.
What kinds of tasks are best suited to agentic coding today?
The article says agentic coding works best on bounded, well-specified tasks with a clear test for done. Examples include writing unit tests for an existing function, updating a dependency, refactoring within one module, or fixing a bug with a failing test. Broader architecture and cross-system work is harder because it depends on knowledge that may not be present in the files the agent opens.
How can a team evaluate whether governance reduces coding drift in its own environment?
The article recommends a two-week evaluation using one mature module, a fixed set of real backlog tasks, and the same prompts and graders across both setups. First, run the current agent setup and record metrics such as tokens read, accepted code, and review or QA outcomes. Then run the same tasks through a setup with org context. The key rule is to change only the handover, so the comparison measures the effect of context rather than a different task, prompt, or grading method.
Most AI benchmarks use public repos. Ours used 15 enterprise codebases, 15–20 years old, and found the hidden bill of AI coding.