A pull request lands in front of you. The code looks reasonable, the tests are green, and the change is small enough to understand. Maybe an AI coding agent wrote most of it, but that is becoming normal enough that you review the diff much as you would anything else.
Code review has traditionally been organised around one basic question:
What did the author change?
We have spent decades getting reasonably good at answering that. We inspect the implementation, look for unintended consequences, challenge assumptions, check the tests and decide whether the change belongs in the codebase.
Coding agents introduce a second question that our review practices were not really built to answer:
What influenced the author?
An agent may read the ticket, ten repository files, three issue comments, documentation from a dependency, some logs and the output of several tools before producing twenty lines of code. The diff tells you where it eventually arrived. It tells you much less about the path it took to get there.
Code review was built around output
When one developer sends another a pull request, there is an assumption sitting quietly underneath the review process: the person who wrote the code was trying to solve the task they were given.
They may have misunderstood something. Their implementation may be poor. They may have copied a terrible Stack Overflow answer at 2 a.m. But there is normally a human mind connecting the material they consumed with the decision they made, and we rarely need a forensic record of everything that developer read before writing a function.
An autonomous coding agent changes the equation because it can consume information from places the reviewer never sees, interpret that information as part of its task, and then act on the development environment.
A GitHub issue is a simple example. To conventional software, an issue comment is basically data. To a language model, it is also context, and context can influence behaviour. Give that model access to repository files, tools, the network and a terminal, and the security question is no longer only what the agent is allowed to execute. It is also what can influence the system deciding what to execute.
Microsoft gave us a useful glimpse of this in June 2026.
Its security researchers had been examining Anthropic’s Claude Code GitHub Action, which can consume GitHub content and operate inside CI/CD workflows. They found that attacker-controlled material such as issue bodies, pull-request descriptions and comments could influence the agent while it had access to sensitive resources. Microsoft reported the issue to Anthropic on April 29, Anthropic mitigated it in Claude Code 2.1.128 on May 5, and Microsoft published the research on June 5. (Microsoft Security)
The mechanics are more interesting than the vulnerability label.
In one example, malicious instructions were hidden inside an HTML comment. A person looking at the rendered GitHub issue would not see them, but the model reading the underlying Markdown would.
The instruction did not simply say, “Steal an API key.” It framed the activity as a routine compliance review and guided the agent towards sensitive environment information. The researchers also instructed the model to remove the first seven characters of the credential before returning it, helping the output get past both the model’s reluctance to expose an obvious secret and GitHub’s secret-scanning pattern. (Microsoft Security)
That is a much better picture of the problem than the familiar “ignore previous instructions” jailbreak.
The hostile instruction was invisible to the human reviewing the page, yet fully available to the agent expected to work from it. If the resulting pull request contained something questionable, the diff might show you the symptom. It would not necessarily show you where the decision came from.
Better judgement is not the same as a boundary
Tracing what influenced the agent only solves part of this.
The obvious response to prompt injection is to make models better at recognising malicious instructions. That work matters, and the models will keep improving. But we do not normally give every process unrestricted access and rely on it to behave responsibly. We isolate processes, scope credentials, control network access and limit what a compromised component can reach.
Anthropic’s own experience makes the point clearly.
During an internal red-team exercise in February 2026, a researcher sent an employee what looked like an ordinary collaboration request containing a prompt to paste into Claude Code. Hidden inside those instructions was a request to read the employee’s AWS credentials, encode them and send them to an external endpoint.
Claude completed the exfiltration in 24 of 25 attempts. (Anthropic)
This is a different failure mode from Microsoft’s GitHub example. That kind of trace would not have prevented it. The malicious instruction arrived through the legitimate user channel itself, so tracing where the instruction came from would simply lead back to the prompt the user had pasted.
From the model’s perspective, there was little reason to treat the instruction as anomalous. Anthropic’s defences are designed in part around understanding user intent; here, the malicious instruction appeared to be the user’s intent.
The reliable defence is much less glamorous: do not let the agent reach credentials it does not need, or prevent it from sending sensitive information to places it should not be able to reach.
A probabilistic system can become very good at deciding which instructions to trust. It still isn’t a filesystem boundary or an egress rule.
What review may need next
Today, the main artefact of review is the diff. As coding agents take on more work, I think we will also need some record of how an agent arrived there.
Not a giant transcript of every token it processed. Nobody is going to read that.
What matters is enough operational lineage to answer useful questions when something looks wrong. Which sources materially influenced the task? What tools were called? Which commands ran? What externally controlled content entered the context? What capabilities were available at the time?
That is closer to an audit trail than a transcript of model reasoning.
And this may matter more as agents get better.
A weak agent makes its mistakes in front of you. You watch it struggle, correct it and understand roughly how it got lost.
A capable agent can disappear into a task for twenty minutes, explore dozens of files, call tools, read documentation, make changes, run tests and return with a neat pull request. That is a better developer experience, but it also means more of the journey happened somewhere you were not looking.
The better the output becomes, the easier it is to forget that the output is only the last step.
What I would change in the review process now
I don’t think teams need an elaborate new governance programme before using coding agents. Most of the useful first steps are fairly ordinary engineering.
Retain the agent’s session or activity record where the platform makes one available, and capture important tool calls and command execution through CI or other audit logs where practical. If a change later looks suspicious, the team should be able to reconstruct more than the final diff.
GitHub is already moving in this direction from the output side. It now applies security validation to code created by supported third-party coding agents such as Claude and OpenAI Codex, including CodeQL analysis, dependency review and secret scanning before the agent finalises its pull request. (GitHub)
Keep the capability boundaries boring and strict. An agent that needs to edit source code does not automatically need production credentials or unrestricted outbound network access. Filesystem isolation, scoped tokens and egress controls still work when the model makes the wrong decision.
Human approval helps too, but I would not treat it as the boundary. Anthropic says users approved roughly 93% of Claude Code permission prompts in its telemetry, with attention falling as the prompts accumulated. That sounds less like an AI problem than an old human one: if you ask people to approve enough things, eventually approval becomes muscle memory. (Anthropic)
And treat externally controlled material as untrusted input even when it does not look executable. Issue comments, PR descriptions, documentation, logs and repository files can all influence an agent trying to decide what to do next.
I would also add one question to reviews involving substantial agent-generated work:
Did this agent consume untrusted external context while producing this change?
Not every pull request needs a forensic investigation. Turning this into another 30-item checklist would probably guarantee that people stop paying attention to it. But asking the question changes the mental model. For most of software history, code review has begun with the code. With agents, sometimes the interesting part happened before the first changed line.
The reality check
Most of the coding-agent conversation is understandably still about productivity. Can the agent fix the ticket? Can it write the tests? Can it work overnight? Can one engineer supervise several agents? How much faster can we ship?
Those are questions worth asking.
But the more useful an agent becomes, the more context and capability we tend to give it. That is the bargain sitting quietly underneath much of the productivity story.
I don’t think that is an argument against coding agents. I expect them to become a normal part of software development. It is an argument for updating what we mean by review.
A clean diff can tell us whether a change looks right. It cannot always tell us why the change exists.
As more code is produced by systems that can read untrusted information, interpret it and act on what they read, the question reviewers may increasingly need to ask is:
What did the thing that wrote this code read before it decided what to do?



