
An agent that can write a production fix should not automatically inherit the credentials to deploy it.
In this article, I explain how I would separate the ability to propose a change from the authority to ship it, moving human judgment toward intent and risk while requiring the delivery pipeline to produce evidence that a change is acceptable. That distinction becomes increasingly important when agents can create changes faster than people can review them, because a larger review queue does not, by itself, make a software factory trustworthy.
Tessl has turned my AI Native DevCon talk into a skill your agent can use as context. You can also watch the full recording.
Paul Duvall: Who Gets the Keys? Trust and Authority in Software Factories.
Move human judgment before implementation
Human code review often happens after the important decisions have already been made. Someone has interpreted the request, chosen an approach and written the implementation, and a reviewer is then expected to reconstruct the intent from a diff. Meanwhile, automated checks may have finished in seconds, leaving the change waiting for hours or days. As agents increase the volume of code, that delay becomes more visible, but the underlying weakness predates agents.
My argument is to move the most valuable judgment upstream for each change. A customer or responsible person should confirm what the system is supposed to do and what acceptance would look like before implementation begins. This does not require a large design phase at the start of a project; it means making intent explicit for the work currently being undertaken, so that the pipeline has something meaningful to validate.
There are two separate questions here: are we building the right thing, and are we building it correctly? A pipeline cannot discover customer intent simply by proving that code compiles or tests pass. Once that intent has been confirmed, however, we can translate recurring expectations into checks and reserve human attention for decisions that genuinely require judgment.
Make tests earn their authority
The foundation remains a delivery pipeline with builds, tests, security analysis, dependency checks, secret scanning and infrastructure validation. Agentic development does not make those controls obsolete. It makes gaps in them more consequential, especially when the same agent can generate both an implementation and the tests that appear to validate it.
Code coverage is useful information, but execution is not the same as a meaningful assertion. A test can visit a line without detecting that the behavior is wrong. Mutation testing offers a stronger challenge by introducing faults into a copy of the code and checking whether the tests notice. It is not proof that a system is correct, but it provides evidence about whether a test suite can detect particular kinds of mistakes.
I would also use independent validation that can compare the specification with the code without inheriting the builder’s reasoning. Looking from specification to implementation asks whether the requested behavior exists; looking from implementation to specification asks whether the agent added behavior nobody requested. Keeping those perspectives separate helps avoid a validator merely accepting the story the author tells about its own work.
That validator should be allowed to block a change or escalate uncertainty, but its opinion should not be sufficient to wave a change through. The acceptance decision needs a collection of evidence, including test results, traceability and attestations, rather than a second model expressing confidence.
Contain agents even when detection fails
Agents encounter instructions through far more channels than their original prompt. They may read an issue containing hostile text, retrieve a poisoned document, observe manipulated telemetry or suggest a dependency that should never enter the build. A system that depends entirely on recognizing every malicious instruction is placing too much trust in detection.
The architecture I describe therefore limits what an agent can do when it encounters untrusted material. An authoring environment should not carry production secrets, and external content should not automatically gain the ability to execute shell commands. Knowledge inputs need provenance and integrity controls, while telemetry access can be read-only and redacted rather than backed by standing production credentials.
Dependencies deserve the same treatment. If an issue persuades an agent to recommend an unapproved package, a vetted registry or allowlist can reject that dependency even if nobody successfully labels the original text as prompt injection. The control succeeds because the proposed action exceeds an established boundary.
These measures do not make an agent infallible. They reduce the consequences of its mistakes by ensuring that the authority available to it is narrower than the set of actions it can imagine or propose.
Give production authority to a protected pipeline
Separating evidence from authority is the central design decision. The agent can author code, tests and proposed specifications, but the pipeline controls deployment, and humans retain responsibility for irreversible actions and exceptional situations.
That requires the pipeline to become one of the most protected parts of the system. Moving a production key from an agent into an easily modified workflow would merely relocate the problem. I describe the target using three ideas: pin inputs, use one controlled deployment identity and eliminate other standing production access for routine work.
Pinning means controlling the versions of dependencies, images and workflow components, with hashes where appropriate. Trusted and untrusted work should not casually share caches. Deployment can use a short-lived federated identity, while signing keys for attestations remain inaccessible to the authoring agent. Provenance should connect the resulting artifact to its commit, specification and relevant agent or model versions.
The distinction becomes particularly clear with irreversible operations. Redeploying an earlier version of an application does not restore a production table that has been deleted. A person must remain responsible for approving that class of action, even when the surrounding delivery process is highly automated.
Watch for changes outside the approved path
A trustworthy pipeline also needs supervision that it cannot quietly disable. In the architecture I propose, independent monitoring lives behind a separate security boundary and watches for changes that bypass the normal path.
Different forms of drift require different responses. If production code or configuration changes without an approved run, the pipeline can restore the last approved state and notify the team. If the pipeline’s own trust policy changes, or acceptance criteria are altered outside the agreed process, continuing to deploy may compound the problem. Those situations call for freezing deployments until trust is restored.
There must also be an emergency path for circumstances in which production and the pipeline are both unavailable. An on-call engineer may need to perform a manual rollback, but that action should be audited and alarmed, and the system must avoid immediately overwriting it with an automated deployment. The lasting correction should then return through the approved pipeline.
A practical starting point is to examine a recurring review comment and turn it into an enforceable check, then connect each change to confirmed intent and require stronger evidence from the tests. Over time, incident experience can refine risk tiers and escalation rules. Humans remain involved before implementation, for consequential irreversible decisions and when something goes wrong, while routine delivery gains a clearer, more defensible basis for deciding what may ship.
AI Trends