Before an AI Agent Changes Your Code, It Needs to Understand What It Can Break

Ashrey Ignise

June 10, 2024

Why AI coding agents need blast-radius analysis, dependency context, and explainable change intelligence before making changes inside complex software systems.

AI Agents Need to Understand What They Can Break

AI agents are getting very good at changing software.

They can inspect a repository, write code, modify multiple files, generate tests, fix linting issues, open pull requests, and sometimes carry a task surprisingly far without much help.

That is useful.

It also creates a new problem.

The ability to make a change is improving faster than the ability to understand its consequences.

An agent can change fifty files in less time than it takes a human reviewer to understand why those files matter.

That means the limiting factor is starting to move.

The question is no longer only:

Can an AI agent make this change?

It is becoming:

Does the agent understand enough of the system to know whether this change is safe?

That is a very different problem.


Writing code is not the same as understanding a system

Consider a simple instruction:

Remove this deprecated API endpoint.

A capable coding agent can probably do the obvious work.

  • Find the endpoint.

  • Remove the handler.

  • Update tests.

  • Delete references.

  • Open a pull request.

On the surface, the task is complete. But that assumes the endpoint is truly safe to remove.

  • What if an internal service still calls it?

  • What if one enterprise customer still depends on it?

  • What if a scheduled job uses it once a month?

  • What if an integration was never migrated?

  • What if a test does not exist for one of those paths?

  • What if the endpoint looks deprecated in code but still exists because of a contractual requirement?

The agent may have completed the coding task perfectly and still made the wrong change.

That distinction matters.

FIGURE 01 — A capable agent can still be context-blind




That is execution.

Now compare it with:




The second agent may eventually write the exact same patch. The difference is what it understood before touching the code.


This is the context problem behind autonomous agents

A lot of discussion around AI agents focuses on capability.

  • Can the model reason?

  • Can it use tools?

  • Can it write production code?

  • Can it plan over multiple steps?

  • Can it recover from errors?

Those questions matter. But enterprise software introduces another constraint—the environment itself is complex.

A software system is not just a repository. It is a web of code, services, APIs, schemas, tests, requirements, architecture, ownership, history, and business rules. An agent working on one part of that system may need context several layers away from the immediate task.

For example:

FIGURE 02 — The real environment around one code change




If the agent only sees the local code, it can optimize the local code. That does not mean it can reason about the system-wide effect.


Larger context windows do not fully solve this

One response is obvious:

  • Give the model more context.

  • More code.

  • More documents.

  • More tickets.

  • More API specifications.

  • More incident history.

That helps.

But there is a difference between having access to information and understanding how that information is connected.

Suppose an agent receives:




There may be everything it needs somewhere in that material.

Now compare that with a structured model:




The second representation gives the agent something the first does not—explicit relationships.

It does not need to rediscover the structure from scratch every time. That is why the context problem is not simply a prompt-size problem.

It is a systems problem.


Agents need a model of what they are acting on

Autonomous systems work best when the environment has a clear structure.

If an agent is booking a meeting, it can reason about calendars, attendees, availability, and time.

If it is moving money, it can reason about accounts, balances, permissions, and transaction rules.

If it is changing enterprise software, the environment is much harder.

It needs to know things like:

  • what this component depends on

  • what depends on this component

  • which behaviors it implements

  • which tests verify those behaviors

  • which APIs expose them

  • which teams own affected systems

  • what historical decisions matter

  • where the model is uncertain

Without that context, autonomy becomes guesswork. And guesswork becomes more dangerous as agents become more capable.


Faster execution increases the cost of missing context

There is an important paradox here.

AI agents reduce the cost of making changes. That sounds like it should reduce risk. In practice, it can increase the number and speed of changes enough that poor understanding becomes the bottleneck.

A human engineer might modify five files over an afternoon.

An agent might touch fifty files in minutes.

A human team might ship ten changes.

A fleet of agents may eventually ship hundreds.

If each change carries a small probability of hidden downstream impact, the aggregate risk compounds.

FIGURE 03 — Execution speed vs understanding




If execution accelerates faster than system understanding, the gap becomes a risk surface.

That gap is where change intelligence becomes important.


What should an agent understand before it acts?

Not every code change needs a company-wide analysis—that would be absurd.

A useful system should adapt the amount of context to the type of change. But for meaningful changes, an agent should ideally reason through a few layers before execution.

1. Local code context

The obvious starting point.

  • What is being changed?

  • Where is it defined?

  • What references it?

  • What functions call it?

  • What does it call?

2. Technical dependencies

  • Which services, modules, interfaces, APIs, schemas, and packages depend on it?

  • What sits downstream?

  • What sits upstream?

3. Verification context

  • Which tests cover the affected behavior?

  • Are important paths untested?

  • What should be rerun after the change?

4. Ownership

  • Which teams or engineers own the affected systems?

  • Who needs to review or approve the change?

5. Intent

  • Why does this behavior exist?

  • Which requirement, ticket, incident, or architectural decision introduced it?

6. Uncertainty

  • Where is the graph incomplete?

  • Which relationships are inferred rather than directly observed?

  • Where should a human review before execution?

This last point is especially important. A useful agent should not pretend to know what it does not know.


“High risk” is not enough

A common pattern in AI tooling is to produce a summary like:

This change is high risk.

That is not particularly useful. High risk because of what?

A useful agent should be able to explain the path.

For example:

FIGURE 04 — Explainable impact




And ideally each edge has evidence.

  • Where was the call found?

  • Which API specification shows the relationship?

  • Which test verifies the behavior?

  • How confident is the system?

This is where explainability becomes operational rather than cosmetic. The agent is not simply making a prediction.

It is showing its work.


Good agents should know when not to act

Autonomy is often framed as:

How much can we let the agent do?

A more useful framing is:

Under what conditions should the agent stop?

Imagine an agent finds this dependency path:




The correct behavior may not be to continue.

The correct behavior may be:

I found an unresolved downstream dependency with no clear owner and no test coverage. Human review is required before removal.

That is not failure.

That is good system behavior.

The most valuable enterprise agents may not be the ones that always complete the task. They may be the ones that understand when the evidence is insufficient to continue safely.


Multi-agent systems make shared context even more important

The problem gets more interesting when multiple agents are involved.

  • Imagine one agent writing code.

  • Another generating tests.

  • Another updating documentation.

  • Another handling rollout planning.

  • Another validating compliance.

If each agent operates from its own isolated understanding of the task, coordination becomes fragile.

They need some shared model of the change.

FIGURE 05 — Shared context for multiple agents




The graph becomes the coordination layer.

Each agent sees the same entities, relationships, dependencies, owners, and constraints.

That is much more robust than hoping each agent reconstructs the system independently.


The real opportunity is not another coding agent

This is where the market can become confusing.

There will be many coding agents. Many will be excellent.

  • Some will specialize by language.

  • Others by workflow.

  • Some will be deeply integrated into IDEs.

  • Others will operate autonomously across repositories.

Trying to build another general-purpose coding agent is not the only opportunity. There is also a layer beneath and around those agents:

the context and governance required for agents to operate safely inside complex systems.

An agent can be very good at execution and still benefit from an independent system that tells it:

  • what the blast radius is

  • which dependencies matter

  • which owners are affected

  • what evidence supports the analysis

  • what must be verified

  • where human approval is required

That is a different product category.


This is where Change Intelligence fits

At Artus, we think of this as part of a broader Change Intelligence layer. The starting question is simple:

If we change this, what else might be affected?

For humans, that helps with impact analysis and review. For agents, it becomes something more fundamental. It becomes part of the precondition for safe execution.

FIGURE 06 — Change-aware agent workflow




The agent is still responsible for doing the work. Change Intelligence helps it understand the environment in which that work will happen.


Autonomy without context is just faster uncertainty

The promise of AI agents is real.

  • Software development will become faster.

  • More tasks will be delegated.

  • More changes will be generated automatically.

  • More execution will happen with less human involvement.

That makes the surrounding system more important, not less. The question will not be whether an agent can write the patch. In many cases, it will.

The harder question will be whether the agent understands enough to know what that patch means. Before an AI agent changes your code, it should understand:

what depends on it, why it exists, who it affects, what needs to be verified, and where it might be wrong.

Because the more autonomous software becomes, the more dangerous context-blind execution becomes. And the faster agents learn to change systems, the more important it becomes for them to understand what they can break.

Background

Every change has consequences. Know them first.

Background

Every change has consequences. Know them first.

Background

Every change has consequences. Know them first.