Skip to content
sinc-LLMBook a 15-minute call
Page signal: 10 sections as samples, joined by sinc reconstruction; computed from this page's text.

The Biggest Opportunity for AI Agents Starts After Launch

AI agents create the most value after launch, when they take over recurring maintenance work under risk limits that humans set and enforce.

Quick Answer & Verified Key Facts

Direct Answer: AI agents require strict controls post-launch, including least privilege access, human approval gates, and stop buttons to prevent automation bias and supply chain risks.

On this page

The biggest payoff from AI agents comes after launch. They can take over the recurring work that keeps software alive, like dependency updates, small fixes, and toil. The key is to match each task to the right level of autonomy and keep risky actions behind human approval.

By Mario AlexandreLLM Performance & Reliability

The biggest opportunity for AI agents in software starts after launch. Most of the work in a product's life is recurring maintenance, not new code. Agents can take over much of that work: dependency fixes, failing tests, alert triage, and toil. The value comes from changing who does the work, with risk limits matched to each task.

It is Monday at 7:40. Three dependency pull requests wait in the queue. One fails a test. A certificate alert fired on Saturday. A customer reported a bug on Friday. None of this is new code. All of it is work that keeps old code alive.

And all of it lands on the same few people. Every week.

This page is part six of a series on software after launch. It makes one claim. AI changes who does the recurring work across the lifecycle, not only how fast code gets written. Below you will find what agents are, what the benchmarks really test, which tasks to hand over first, and where agents acting on production go wrong.

Launch is where the recurring work begins

Software maintenance is the modification of software after delivery. That definition comes from the Wikipedia entry on software maintenance. It is the work that starts the day you ship and never stops.

Maintenance is not one kind of task. The same source splits it into types. Corrective maintenance fixes a bug, often one a user reported. Preventive maintenance fixes problems before they show up. Adaptive maintenance keeps the software usable as the world around it changes.

That last type is the quiet one. Your code can sit still while its runtime, its dependencies, and its certificates move. The series covers this in detail in software that goes obsolete without code changes.

Why does the work never stop? Lehman's laws of software evolution give the classic answer. The law of Continuing Change says a system "must be continually adapted or it becomes progressively less satisfactory." Software that people use lives in a world that keeps shifting.

So the shape of the job after launch is a loop, not a line. Updates arrive. Tests break. Alerts fire. Someone reads, decides, fixes, and ships. Then it repeats.

This is where AI agents fit best. A tool that helps you write a feature faster pays off once. A tool that takes over a weekly task pays off every week, for as long as the product lives.

That is the reframe for this page. The prize is not faster code. It is fewer recurring tasks that need a human to start them.

Who does the work matters more than how fast it gets done

Most talk about AI in software is about speed. How many lines per hour. How fast a feature ships. That framing misses where the hours go after launch.

A small team that owns a live product spends its week on a mix of new work and upkeep. The upkeep part has a strange property. It does not shrink when you get faster at it. It just keeps arriving.

If a founder or one senior engineer is the only person who can do that upkeep, they have become part of the system. The series calls this building yourself another job. An agent that can take a slice of that loop changes who the critical dependency is.

Toil is the clearest target for AI agents

Toil is the best first target for a maintenance agent. Google SRE defines it as manual, repetitive, automatable work with no lasting value, and that is the kind of work agents can take on with the least risk.

The Google SRE book chapter on eliminating toil gives the full definition. Toil is work "tied to running a production service that tends to be manual, repetitive, automatable, tactical, devoid of enduring value, and that scales linearly as a service grows."

Each trait is a useful test for an agent task:

  • Manual. A person runs it by hand.
  • Repetitive. You have done it before, and you will do it again.
  • Automatable. Per the SRE book, "If a machine could accomplish the task just as well as a human, or the need for the task could be designed away, that task is toil."
  • Tactical. It is driven by interrupts, not by a plan.
  • No enduring value. The book says that if the service "remains in the same state after you have finished a task, the task was probably toil."
  • Scales with size. If the work grows linearly with traffic, users, or service count, it is probably toil.

The same chapter gives the line that makes the boundary clear. "If human judgment is essential for the task, there's a good chance it's not toil." That sentence is a map for agents. Toil is where agents start. Judgment is where humans stay.

The 50 percent cap shows how heavy toil gets

Google SRE treats toil as something to cap, not just reduce. According to the toil chapter, at least 50% of each SRE's time should go to engineering project work. The chapter on being on-call says the same from the other side: SREs spend at most 50% of their time on operational work.

That cap exists because toil grows on its own. Left alone, it eats the time that would have made it smaller. A team that never gets ahead of toil never gets to build the tools that would cut it.

The SRE book also quotes Carla Geisser of Google SRE: "If a human operator needs to touch your system during normal operations, you have a bug." Read that with agents in mind. An agent does not remove the bug. It moves the touch from a human to a machine. That is progress, but it is not the end state.

Measure toil before you hand it to an agent

The Google SRE workbook on toil asks teams to "adopt a data-driven approach to identify and compare sources of toil" and to "quantify the time saved." You cannot judge an agent if you never measured the work it replaced.

The workbook also gives advice that teams often skip. It says "rejecting a toil-intensive task should be the first option you consider." Before you build an agent for a task, ask if the task should exist at all. An agent that does useless work faster is still doing useless work.

Finally, the workbook endorses a partial step. It suggests teams "consider a partially automated approach as an interim step toward full automation." It calls this an "engineer behind the curtain" model. That is exactly how a first maintenance agent should work. The agent does the routine part. A human still handles the edge cases and makes the call.

Reframe: the goal is not an agent that does toil. The goal is less toil, with an agent doing what remains.

Dependency bots already do part of this work

Dependabot and Renovate already automate one slice of maintenance: they open pull requests that bump dependency versions. AI agents do not replace them. Agents pick up where the bots stop, when a version bump breaks the build and someone has to fix the code.

What Dependabot does

GitHub's docs on Dependabot version updates describe them as "automated pull requests that keep your dependencies updated," even when there is no known vulnerability. You turn them on "by checking a dependabot.yml configuration file into your repository."

One detail in those docs matters a lot for this topic. "When maintainers of a repository stop interacting with Dependabot pull requests, Dependabot temporarily pauses its updates and lets you know." The bot depends on a human reading its output. If nobody reads, the loop stops.

That is the real bottleneck. Opening the pull request is cheap. Reading it, testing it, and fixing what it breaks is the work.

What Renovate does

The Renovate docs describe a similar tool with more knobs. It opens "pull requests to update your dependencies and lock files." It lets you "reduce noise by scheduling when Renovate creates PRs." It can also open "replacement PRs to migrate from a deprecated dependency to the community suggested replacement."

Both tools are deterministic. They follow rules you wrote. Given the same config and the same registry state, they do the same thing. That is a strength. It makes them easy to trust and easy to audit.

Where the bots stop and agents can start

Here is the gap. A bot can tell you a new major version exists. It cannot rename the call sites that changed. It cannot read a failing test, trace it to a removed option, and patch your code. It cannot write a clear note on why the change is safe.

Those are judgment tasks with a clear check at the end. The tests either pass or they do not. That makes them a strong fit for an agent.

Task Rule-based bot (Dependabot, Renovate) AI agent Human
Detect a new version Yes Not needed Not needed
Open a version bump PR Yes Not needed Not needed
Group and schedule updates Yes, by config Not needed Sets the policy
Fix code broken by an API change No Yes, in a branch Reviews the diff
Summarize release notes for risk No Yes, as a draft Checks the summary
Decide to merge a major upgrade No Recommends Decides
Pin or reject a suspect release By rule only Flags it Decides

The table shows the pattern for the rest of this page. Keep deterministic tools for deterministic steps. Use agents for the open-ended step in the middle. Keep the decision with a person.

Reframe: the bot opens the door. The agent does the chores inside. A human still owns the house.

Workflows and agents are different tools

An AI workflow runs a model through fixed steps you wrote. An AI agent lets the model choose its own steps and tools. For maintenance, most tasks need a workflow, and only a few need a full agent.

The clearest split comes from Anthropic's guide, Building Effective Agents. It says: "Workflows are systems where LLMs and tools are orchestrated through predefined code paths." Agents, by contrast, "are systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks."

The same guide gives advice that every maintenance team should pin to the wall. "We recommend finding the simplest solution possible, and only increasing complexity when needed. This might mean not building agentic systems at all."

The site already has a full page on choosing an AI agent or a deterministic workflow. This page applies that choice to the specific jobs that show up after launch.

Five workflow patterns mapped to maintenance jobs

The Anthropic guide names five workflow patterns. Each one has a natural home in maintenance work.

Prompt chaining. The guide says prompt chaining "decomposes a task into a sequence of steps, where each LLM call processes the output of the previous one." You can add programmatic checks between steps. In maintenance, a chain might read a changelog, list breaking changes, then draft a migration note. A script checks each step before the next one runs.

Routing. "Routing classifies an input and directs it to a specialized followup task." A maintenance router reads an incoming alert or issue and sends it to the right path. A flaky test goes one way. A dependency break goes another. A security report goes straight to a human.

Parallelization. The guide names two forms: sectioning, which splits a task into independent parts, and voting, which runs the same task more than once. Sectioning fits a repo with many services that each need the same update. Voting fits risk calls, like asking three times whether a diff touches auth code.

Orchestrator-workers. Here "a central LLM dynamically breaks down tasks, delegates them to worker LLMs, and synthesizes their results." This fits a large migration where you cannot know up front which files must change.

Evaluator-optimizer. "One LLM call generates a response while another provides evaluation and feedback in a loop." In maintenance, one model drafts a fix and a second one reviews it against the issue and the test output.

When a full agent is worth it

The guide says agents suit "open-ended problems where it's difficult or impossible to predict the required number of steps, and where you can't hardcode a fixed path." Debugging a failure you have never seen is like that. So is fixing a build after a major upgrade.

Two parts of the guide matter most for maintenance. First, agents must gain "ground truth" from the environment at each step, such as tool results or code execution. Second, it is "common to include stopping conditions (such as a maximum number of iterations) to maintain control."

The guide also names the cost. "The autonomous nature of agents means higher costs, and the potential for compounding errors." Its advice is "extensive testing in sandboxed environments, along with the appropriate guardrails."

Why coding work suits agents

The guide gives specific reasons coding is a good fit. "Code solutions are verifiable through automated tests," and agents "can iterate on solutions using test results as feedback." Maintenance work inherits that strength. A fix for a broken build has a clear pass or fail signal.

The guide adds a limit right after. "Whereas automated testing helps verify functionality, human review remains crucial for ensuring solutions align with broader system requirements." Tests tell you the code runs. They do not tell you the change was the right one. The site's page on why developers use AI agents but verify the work goes deeper on that review step.

For a catalog of patterns beyond maintenance, see AI agent orchestration patterns.

Reframe: start with a workflow. Earn your way to an agent one task at a time.

What SWE-bench and SWE-agent actually measure

SWE-bench measures whether a model can write a patch that makes a real GitHub issue's tests pass. SWE-agent measures how much a better tool interface helps an agent do that. Neither one measures deploys, rollbacks, or the call about when not to act.

How SWE-bench works

SWE-bench is a benchmark from a paper published at ICLR 2024. It holds 2,294 problems "drawn from real GitHub issues and corresponding pull requests across 12 popular Python repositories."

The task setup is plain. "Given a codebase along with a description of an issue to be resolved, a language model is tasked with editing the codebase to address the issue." The model writes a patch. The harness applies it. Then it runs "the unit and system tests associated with the task instance."

The pass rule is strict. "If the patch applies successfully and all of these tests pass we consider the proposed solution to have successfully resolved the issue." The score is the share of tasks resolved.

The paper notes that these fixes are hard. They often need "coordinating changes across multiple functions, classes, and even files simultaneously." That is close to real maintenance. A bug report rarely maps to one line.

The first results were low. As reported in the paper, the best model at the time, Claude 2, solved "a mere 1.96% of the issues." Later systems did much better. The Anthropic guide reports that its agents "can now solve real GitHub issues in the SWE-bench Verified benchmark based on the pull request description alone."

How SWE-agent changed the setup

SWE-agent asked a different question. What if the model gets tools built for it? The authors "posit that LM agents represent a new category of end users with their own needs and abilities." They argue such agents "would benefit from specially-built interfaces to the software they use."

They call this the agent-computer interface, or ACI. One example stands out for maintenance teams. SWE-agent puts "a code linter into the edit function to alert the agent of mistakes." Then "invalid edits are discarded, and the agent is asked to try editing the file again."

That is a guardrail built into the tool, not a prompt. It is the same idea you should use in production. Checks that live in code are stronger than rules that live in instructions.

Per the paper's abstract, SWE-agent reached a pass@1 rate of 12.5% on SWE-bench. The exact number is now dated. The lesson is not. The interface around the model moved the result as much as the model itself.

The Anthropic guide makes the same point. Its three core principles for agents are simplicity, transparency about planning steps, and a carefully crafted agent-computer interface backed by thorough tool docs and tests.

What the benchmarks leave out

A benchmark score is a useful signal. It is not a job description. Here is what SWE-bench style tests do not cover:

  • Deploy and rollback. The task ends at a passing test, not at a safe release.
  • Production state. No live data, live traffic, or live users are at risk.
  • Missing tests. Real repos often lack a test for the bug. The benchmark always has one.
  • Ambiguous issues. Real reports can be vague, wrong, or duplicates.
  • When not to act. No task rewards the agent for saying "this should wait."
  • Supply chain trust. No task asks if a new release is safe to accept at all.

So treat benchmark results as evidence that agents can write patches. Do not treat them as evidence that agents can run your system. The page on the AI agent evaluation checklist covers how to test an agent on your own tasks.

Reframe: a benchmark proves the agent can fix code. Only your own trial proves it can fix your code safely.

Match each maintenance task to an agent by risk

The safe way to give work to agents is to sort tasks by risk first. Rate each task on how easy it is to undo, how much it can break, and how well you can check it. Then give the agent only as much freedom as that rating allows.

Three questions that set the risk tier

Ask three questions about any task before an agent touches it.

  1. Can you undo it? A branch can be deleted. A merged commit can be reverted. A dropped table may be gone for good.
  2. How far can it reach? A doc fix touches one file. A config push can touch every user.
  3. Can a machine check it? A test suite gives a clear signal. A judgment about customer impact does not.

A task that is easy to undo, small in reach, and easy to check is a low tier task. A task that fails any one of those tests moves up. A task that fails two or more stays with a human, with the agent as a helper at most.

A decision table for maintenance tasks

Task Undo Reach Check Tier Agent role
Summarize release notes Easy None Human read 0 Acts alone, output is a note
Fix a failing test in a branch Easy One repo Tests 1 Opens a PR, human merges
Fix build after a minor bump Easy One repo Tests 1 Opens a PR, human merges
Triage a new alert Easy None Human read 1 Writes findings, no actions
Major framework upgrade Medium Many files Tests, partial 2 Drafts in stages, human reviews each
Restart a stuck worker Easy One service Health check 2 Runs a named runbook step after approval
Change prod config or flags Medium All users Weak 3 Proposes only
Rotate secrets or keys Hard All users Weak 3 Proposes only
Delete data or drop tables None All users None 3 Never
Decide during an incident Varies All users None 3 Gathers facts for the commander

Tier 0 work has no side effects. Tier 1 work ends in a pull request. Tier 2 work needs a human to approve each step. Tier 3 work stays with a human.

Use the error budget as a brake

Google SRE gives a ready tool for this. The chapter on embracing risk describes the error budget as "a clear, objective metric that determines how unreliable the service is allowed to be within a single quarter." While budget remains, "new releases can be pushed."

Apply that to agents. When the budget is healthy, tier 1 and tier 2 agent work can flow. When the budget is spent, freeze agent changes along with human ones. An agent should not be a back door around a change freeze.

Consistency is a strong reason to automate

The Google SRE chapter on automation makes a point that is easy to miss. For "the execution of well-scoped, known procedures," the value of consistency is often the main reason to automate. Humans skip steps when tired. Scripts do not.

That cuts both ways for agents. An LLM agent is less consistent than a script. If a task is a known procedure, write the script. Save the agent for the parts a script cannot handle. This matches the simplest solution advice from the Anthropic guide.

Reframe: autonomy is not a setting for the agent. It is a setting for each task.

Illustrative arithmetic: what an agent can free up

This section is illustrative arithmetic, not a measurement. It shows how to size the gain from a maintenance agent, using inputs you would replace with your own logged hours. The main lesson is that review time decides whether the agent saves anything.

The inputs

Suppose a small team logs its maintenance work for four weeks. In this example, the weekly totals look like this:

  • Dependency update PRs: 6 per week, 30 minutes each to review, test, and fix. That is 3 hours.
  • Failing or flaky tests: 4 per week, 45 minutes each. That is 3 hours.
  • Alert triage: 10 alerts per week, 15 minutes each. That is 2.5 hours.
  • Small bug fixes from user reports: 3 per week, 1 hour each. That is 3 hours.

The total is 11.5 hours a week of recurring work.

The agent scenario

Now suppose an agent drafts a fix for each dependency PR, each failing test, and each small bug. It also writes a triage note for each alert. A human still reviews every output.

In this illustrative case, assume review takes 10 minutes per item. Assume one in four agent outputs needs real rework, at the old full time.

Task Items Review time Rework items Rework time New total
Dependency PRs 6 60 min 1.5 45 min 105 min
Failing tests 4 40 min 1 45 min 85 min
Alert triage 10 100 min 2.5 37.5 min 137.5 min
Small bug fixes 3 30 min 0.75 45 min 75 min
Total 23 230 min 172.5 min 402.5 min

The new weekly total is 402.5 minutes, or about 6.7 hours. The old total was 11.5 hours. So the team gets back about 4.8 hours a week in this example.

What the numbers teach

Look at alert triage. It saves the least. Ten short tasks each need a full review, so the review cost eats most of the gain. An agent helps most on long tasks with fast checks.

Now change one input. Say review takes 25 minutes per item, not 10. Review time jumps to 575 minutes. Add the same rework and the new total is 747.5 minutes, about 12.5 hours. The agent now costs more time than it saves.

That is why you measure first. The same agent can be a gain or a loss. The swing comes from review cost and rework rate, not from how smart the model is.

For a broader method to track this kind of return, see measuring AI workflow automation ROI.

Reframe: the agent's speed is not the bottleneck. Your review time is.

Agents acting on production carry specific risks

An agent that can act on production can do damage fast when its output is wrong, unclear, or manipulated. OWASP calls this excessive agency. The fix is to limit what the agent can do in code, not to ask it to be careful in a prompt.

Excessive agency, defined

The OWASP LLM06:2025 entry on Excessive Agency defines it as "the vulnerability that enables damaging actions to be performed in response to unexpected, ambiguous or manipulated outputs from an LLM." Note the last part. It does not matter why the model went wrong. What matters is what it was allowed to do.

OWASP names three root causes: "excessive functionality; excessive permissions; excessive autonomy." Each maps to a maintenance mistake.

  • Excessive functionality. The agent has a shell when it only needed to run tests.
  • Excessive permissions. The agent's token can push to main, not just open a branch.
  • Excessive autonomy. The agent merges and deploys with no human gate.

Automation can fail at machine speed

Automation failures are not new, and they are not unique to LLMs. The Google SRE chapter on automation tells the story of Diskerase. A decommission job failed partway, then was restarted. On the second run, the set of machines left to wipe was empty. "Unfortunately, the empty set was used as a special value, interpreted to mean 'everything.'" The automation sent almost every machine in every site to be wiped.

That was a plain script, not an AI agent. The lesson still applies. Automation does exactly what its logic says, at full speed, across everything it can reach. An LLM agent adds a new layer: its logic can change from run to run. Limits on reach matter even more.

Untrusted text is an attack path

Maintenance agents read a lot of text they did not write. Issues, changelogs, commit messages, error logs, and package READMEs all flow in. Any of them can carry an attack.

The Claude Code security docs define the threat. "Prompt injection is a technique where an attacker attempts to override or manipulate an AI assistant's instructions by inserting malicious text." A crafted issue could tell a triage agent to add a new maintainer or change a deploy key.

The site covers this in depth in indirect prompt injection in RAG and agents.

Supply chain updates need human judgment

Dependency updates look like the safest agent task. Most of the time they are. But an update can also carry an attack.

The XZ Utils backdoor is the clearest recent case. According to that entry, the exploit "was deliberately included in the software in February 2024 by a user going by the name of 'Jia Tan', affecting both versions 5.6.0 and 5.6.1." A bot or agent that pulled the newest version on sight would have pulled the backdoor.

So keep the merge call for releases with a human, at least for core packages. An agent can flag odd signs, like a new maintainer or an unusual build step. It should not be the one that decides to trust them.

Incidents need one set of hands

The Google SRE chapter on managing incidents is direct. "The operations team should be the only group modifying the system during an incident." An agent that keeps fixing things on its own during an outage is a second team. It can undo the fixes the humans are trying.

During an incident, the agent's job is to gather facts, pull logs, and draft notes for the incident commander. The page on an AI incident runbook for on-call shows how to set that up.

People trust machines too much

The last risk is on the human side. EU AI Act Article 14 asks people overseeing high-risk AI systems "to remain aware of the possible tendency of automatically relying or over-relying on the output produced by a high-risk AI" system. It names this automation bias.

Most maintenance agents are not high-risk systems under that Act. The idea still applies. After the fiftieth good pull request, the reviewer stops reading closely. That is exactly when the bad one gets through.

Reframe: the danger is not that the agent is wrong. It is that the agent is wrong with write access and nobody is reading.

Controls that keep a maintenance agent safe

A safe maintenance agent runs with the least access it needs, in a sandbox, with checks enforced outside the model and a human gate on high-impact steps. These controls come straight from OWASP LLM06 and from how coding agent tools ship today.

Enforce limits outside the model

OWASP's mitigation list is the core of this section. Four items do most of the work.

  • Least privilege. "Limit the permissions that LLM extensions are granted to other systems to the minimum necessary." Give the agent a token that can open branches and PRs, not one that can push to main.
  • Complete mediation. "Implement authorization in downstream systems rather than relying on an LLM to decide if an action is allowed or not." Branch protection in your git host is mediation. A rule in the prompt is not.
  • Human approval. "Utilise human-in-the-loop control to require a human to approve high-impact actions before they are taken."
  • Rate limits and logs. OWASP advises you to log and monitor agent actions and to "implement rate-limiting to reduce the number of undesirable actions that can take place within a given time period."

Rate limits are underrated. Cap the agent at a small number of PRs per hour. If something goes wrong, the damage stays small while you notice.

Start read-only and sandboxed

The Claude Code docs show the pattern a coding agent tool can use. It "starts with read-only permissions. When it needs to edit files, run tests, or execute commands, it asks you first." It also offers a sandboxed Bash tool that can "sandbox Bash commands with filesystem and network isolation."

The same docs are clear about who holds the risk. "You're responsible for reviewing proposed code and commands for safety before approval." The tool gives you gates. You still have to use them.

For a maintenance agent, run it in a container or CI job with no production secrets. Let it reach the test database, not the real one. The page on separating the agent sandbox from production covers the layout.

Wire the agent to alerts as a subscriber, not an operator

The safe way to connect an agent to monitoring is one way in and one way out. Alerts flow to the agent. Findings flow back as text. Nothing else crosses the line at first.

  1. Fan out, do not reroute. Send each alert to your human channel first, then copy it to the agent with a webhook. The agent is an extra reader. If it fails, people still get paged.
  2. Send a fixed payload. Pass the alert name, severity, start time, affected service, and a link to the dashboard. Keep the format the same every time so the agent's output can be compared across incidents.
  3. Give read-only query access. Let the agent read metrics, recent logs, and the deploy history through scoped tokens. Do not give it write access to the monitoring system, so it cannot silence or edit alerts.
  4. Treat alert text as untrusted. Log lines and error messages can carry text an attacker controls. The agent should summarize them, not follow instructions inside them.
  5. Post findings to the incident thread. The output is a short note: likely cause, evidence links, the runbook that fits, and what the agent is unsure about. A human decides what to do.
  6. Score it after each incident. In the postmortem, mark whether the agent's first guess was right and whether it saved time. Only promote it to taking actions after a run of correct, useful notes.
  7. Rate limit it. Cap how many alerts it handles per hour. An alert storm should not become an agent storm that floods the thread.

This setup lets you learn how good the agent is on your real incidents without giving it any power to make them worse.

Build a stop button

Article 14 describes a way to "interrupt the system through a 'stop' button or a similar procedure that allows the system to come to a halt in a safe state." Every maintenance agent needs one.

In practice, a stop button is a single flag or config change that disables the agent's write token or its job schedule. Test it before launch. A stop button you have never pressed is a guess.

Record what the agent did and why

Each agent run should leave a trail. Record the task, the inputs it read, the tools it called, the diff it made, the tests it ran, and who approved what. The page on what an AI agent audit trail must record lists the fields.

A trail turns a strange PR from a mystery into a five minute read. It also lets you count rework and reverts, which you need for the arithmetic above.

For approval design in more depth, see AI agent human approval workflows.

Reframe: trust the gate, not the agent.

A step-by-step rollout for your first maintenance agent

Roll out a maintenance agent one task type at a time. Measure the work first, run the agent in shadow mode, then let it open pull requests, and only widen its scope when the numbers say it helps. Each step below has a clear exit test.

  1. Log the work for two to four weeks. Record each recurring task, its type, and the minutes it took. This is the SRE workbook's data-driven step. Without it you cannot tell gain from noise.
  2. Cut what should not exist. Go down the list and ask if each task can be rejected or designed away. The workbook says rejecting toil should be the first option. Some tasks will vanish.
  3. Script the known procedures. If a task is a fixed sequence, write a plain script or a workflow. Keep agents for the open-ended part.
  4. Pick one tier 1 task type. A good first choice is "fix the build after a dependency bump." It has a clear test signal and ends in a pull request.
  5. Set up the sandbox and token. Run the agent in CI or a container. Give it a token that can open branches and PRs only. Keep production secrets out of its reach.
  6. Add hard stops. Set a cap on steps per run and on PRs per hour. Wire a stop flag that disables the job. Press it once to prove it works.
  7. Run in shadow mode for two weeks. The agent drafts fixes but does not open PRs. A human does the task as usual, then compares. Count how often the draft would have been right.
  8. Turn on pull requests. Let the agent open PRs with a clear label. Require a human review on every one. Track merges without edits, rework, and reverts.
  9. Compare against your baseline. Use the arithmetic method above with your real review time and rework rate. If the saved time is near zero, stop and fix the task choice or the tools.
  10. Widen one step at a time. Add the next task type only when the first is clearly net positive. Never skip from tier 1 to tier 3.

The site's guide to building your first agentic workflow covers the build side of steps 3 to 6.

Know when the agent should not act

Proposition seven in this series says to delegate execution, not accountability. Part of that is knowing when not to act. Agents do not need to change software all the time to keep it alive.

Build "do nothing" into the agent's options. A good maintenance agent should be able to say: this update is a major version, wait for a human. This alert is noise, close it with a note. This bug needs product input. A run that ends in a clear "no action" is a good run. The companion page on delegating execution, not accountability covers this in full.

Reframe: an agent that knows when to stop is worth more than one that always ships.

Failure modes and how to detect them

Maintenance agents fail in a small set of repeatable ways. Most can be caught with simple counters on the pull requests and runs the agent produces. The table lists each failure, how it shows up, and the signal to watch.

Failure mode What it looks like How to detect it
Test gaming Agent edits or skips a test to make the build pass Flag any diff that changes test files in a fix PR
Scope creep A small fix turns into a large refactor Alert when diff size passes a set line count
Silent rework PRs merge, but humans edit them heavily first Track the share of agent PRs edited before merge
Revert spike Merged agent changes get rolled back Count reverts per task type each week
Loop burn Agent retries the same failing step many times Cap steps per run and log runs that hit the cap
Review fatigue Review time per PR drops to near zero Track review time and sample PRs for a second check
Injected intent Agent acts on text from an issue or log Diff agent actions against the task it was given
Stale baseline Saved time is claimed but never measured Recompute the arithmetic each month from logs

Two of these deserve extra care. Test gaming is the agent version of a known problem: the metric is tests passing, so the shortcut is to change the tests. Block it with a rule that fix PRs cannot touch test files without a separate review.

Review fatigue is the human version of the same problem. When review time per PR falls fast, it can mean the agent got better. It can also mean the reviewer stopped reading. Sample a few merged PRs each week and have a second person check them.

Reframe: count the reverts, not the merges.

Checklist and what to do this week

A maintenance agent is ready to widen its scope only when every item below is true. If you do one thing this week, log your recurring work for five days so you have a baseline to judge any agent against.

Readiness checklist

  • [ ] You logged recurring work by task type for at least two weeks.
  • [ ] You cut or redesigned tasks that should not exist.
  • [ ] Fixed procedures run as scripts or workflows, not agents.
  • [ ] The agent runs in a sandbox with no production secrets.
  • [ ] Its token can open branches and PRs, but cannot push to main.
  • [ ] Branch protection enforces review in your git host, outside the model.
  • [ ] Steps per run and PRs per hour are capped.
  • [ ] A stop flag exists, and someone has pressed it in a test.
  • [ ] Every run leaves a trail: inputs, tools, diff, tests, approvals.
  • [ ] Fix PRs cannot change test files without separate review.
  • [ ] Core dependency major versions need a human merge.
  • [ ] During incidents, the agent only gathers facts for the commander.
  • [ ] You track merges without edits, rework, reverts, and review time.
  • [ ] The agent can end a run with "no action" and a reason.

This week

Pick one person. Give them a simple sheet. For five working days, they log every task that kept the product alive: updates, broken tests, alerts, small fixes. Note the type and the minutes.

At the end of the week, sort by total time. The top row that is easy to undo and easy to test is your first agent task. Everything else waits.

That is the whole opportunity in one move. Not a faster way to write code. A new answer to the question of who does the work that never stops. For the system view of that work, read software maintenance as a system that keeps software alive.

Frequently asked questions

Why do AI agents matter more after launch than before?

Software maintenance is the change you make after delivery, and it never stops. Lehman's law of Continuing Change says a system must keep adapting or it gets less useful. That work is recurring, so it repeats every week. AI agents change who does that recurring work. Writing new code faster helps once. Taking over a weekly task helps every week for the life of the product.

What maintenance tasks are safe to give an AI agent first?

Start with tasks that are reversible, easy to check, and done in a branch. Good first tasks are dependency update fixes, failing test repair, changelog summaries, and alert triage notes. Each one ends in a pull request or a written report that a human reviews. Avoid tasks that change production state, delete data, rotate secrets, or touch billing until your controls are proven.

What does SWE-bench measure?

SWE-bench gives a model a real codebase and a real GitHub issue. The model must write a patch. The patch counts as resolved if it applies and the related unit and system tests pass. The benchmark has 2,294 problems from 12 Python repositories. It measures patch quality against tests. It does not measure deploys, rollbacks, on-call work, or judgment about when not to act.

How is an AI agent different from Dependabot or Renovate?

Dependabot and Renovate are rule-based bots. They open pull requests to bump dependency versions on a schedule you set. They do not read a failing build and fix your code to match a new API. An AI agent can pick up where the bot stops. It can read the error, edit the code, run the tests, and explain the change in the pull request.

What is excessive agency in AI agents?

Excessive agency is the OWASP LLM06 risk. It means an LLM system can take damaging actions when its output is wrong, unclear, or manipulated. OWASP lists three root causes: too much functionality, too many permissions, and too much autonomy. For a maintenance agent, the fix is narrow tools, least privilege, human approval for high-impact actions, and checks enforced outside the model.

Should an AI agent ever act on production directly?

Rarely, and only for narrow, reversible actions with a tested rollback. Most maintenance agents should work in a branch or a sandbox and hand changes to the normal deploy path. Google SRE guidance says only the operations team should modify a system during an incident. Treat the agent as a helper to that team, not a second team acting on its own.

How do I measure whether a maintenance agent is helping?

Measure toil before you start, as the Google SRE workbook advises. Log hours per task type for two to four weeks. Then track, per task type, how many agent pull requests merge without edits, how many need rework, and how many get reverted. Count the review time too. If review time eats the saved time, the agent is not helping yet.

Sources

  1. Building Effective Agents (Anthropic): Workflow and agent definitions, the five workflow patterns, and guidance on coding agents.
  2. SWE-bench: Can Language Models Resolve Real-World GitHub Issues?: Benchmark design, task setup, test-based scoring, and the original baseline result.
  3. SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering: Agent-computer interface design, linter-guarded edits, and reported pass@1 result.
  4. About Dependabot version updates (GitHub Docs): How Dependabot opens update pull requests and pauses when ignored.
  5. Renovate documentation: Automated dependency and lock file pull requests, scheduling, and replacement PRs.
  6. Eliminating Toil (Google SRE Book): Definition and traits of toil and the 50 percent cap.
  7. Eliminating Toil (Google SRE Workbook): Measuring toil, rejecting toil, and partial automation as an interim step.
  8. The Evolution of Automation at Google (Google SRE Book): Consistency as a value of automation and the Diskerase incident.
  9. Being On-Call (Google SRE Book): Cap on operational work for SREs.
  10. Embracing Risk (Google SRE Book): Error budgets as an objective limit on change.
  11. Managing Incidents (Google SRE Book): Only the operations team should modify the system during an incident.
  12. OWASP LLM06:2025 Excessive Agency: Root causes and mitigations for damaging agent actions.
  13. Claude Code security (Anthropic Docs): Read-only default, permission prompts, sandboxing, and prompt injection.
  14. EU AI Act Article 14: Human Oversight: Oversight, stop procedure, and automation bias for high-risk AI systems.
  15. Software maintenance (Wikipedia): Definition and types of maintenance.
  16. Lehman's laws of software evolution (Wikipedia): Law of Continuing Change.
  17. XZ Utils backdoor (Wikipedia): Supply chain backdoor in versions 5.6.0 and 5.6.1.
Original source record

Skip to content

sinc-LLMAboutBlogServices