EngineeringLead

AI agents

AI agents in the software development lifecycle

Coding agents can now take a task, change files across a repository, run commands and open a pull request. That changes what an engineering lead has to decide: not only which tool to use, but what it may do on its own, where a person must approve, and how you would know if something went wrong.

Assistants and agents are different risks

AssistantAgent
How it worksSuggests code or answers; a person applies it Plans and carries out multi-step work: edits files, runs commands, calls tools
Where a person sitsOn every change, by default Wherever you put a checkpoint, and nowhere else
Main riskAccepting a wrong suggestion Actions taken with the permissions it was given
Main controlReviewPermissions, environments and approval points

The practical rule: an agent can do anything its credentials allow. Design its access as you would for a new contractor on their first day, and then narrower.

Where agents fit in each stage

StageUseful agent workKeep with a person
PlanningSummarizing issues, drafting task breakdowns, finding related code Priorities, scope, and what not to build
DesignListing options, drafting a design note from a brief Choosing between options with long-term cost
ImplementationWell-specified changes, migrations, test scaffolding Security-sensitive and safety-related code decisions
TestingWriting and running tests, reproducing bugs Judging whether the tests prove the right behavior
ReviewFirst-pass comments, consistency checksApproval and merge
ReleasePreparing release notes, checking the pipeline The decision to deploy, and rollback calls
OperationsGathering logs and timelines during incidents Production changes and customer communication

Designing permissions and checkpoints

  1. List the actions. Read code, write code, run tests, install packages, open pull requests, comment, merge, deploy, change infrastructure, read production data, use secrets.
  2. Classify each action. Allowed without approval, allowed with approval, or never. A common starting point: agents may read code, edit in a branch, run tests in a sandbox and open pull requests; they may not merge, deploy, change infrastructure or touch secrets without a named person approving.
  3. Separate environments. Run agents in sandboxes or containers with no production credentials and limited network access.
  4. Use scoped credentials. Short-lived tokens with only the permissions needed, tied to an identifiable agent account so its actions are distinguishable from a person's.
  5. Protect the main branch. Require review and passing checks for every change, whoever or whatever opened it.
  6. Log everything. Commands run, files changed, tools called. You cannot review what you cannot see.

Write these decisions into your AI coding assistant policy so the team works from the same rules.

Risks specific to agents

Writing tasks agents can do well

Agents do better with the same things that help people: a clear goal, context and a definition of done.

Task template

Goal: one sentence describing the outcome.
Context: relevant files, related issues, constraints, patterns to follow.
Out of scope: what must not change.
Done when: tests that must pass, behavior to demonstrate.
Report back: summary of the approach, what was tried and rejected, open questions.

Rolling agents out to a team

  1. Start with low-risk work: tests, documentation, dependency updates, small refactors in well-tested code.
  2. Pair first. An engineer supervises the agent closely until the team knows where it fails.
  3. Review the reviews. Check whether agent pull requests are getting real scrutiny. See reviewing AI-generated code.
  4. Expand gradually, one permission at a time, based on what you observe.
  5. Measure outcomes, including rework and incidents, not only volume. See DORA, SPACE and DX Core 4.

What to monitor once agents are running

SignalWhy it matters
Share of agent pull requests merged without changesVery high can mean light review, not perfect output
Agent pull requests reverted or reworkedShows where agents are not yet reliable
Files changed outside the task scopeEarly warning of scope creep
Permission denials and approval requestsShows whether boundaries are set in the right place
Run time and spend per taskCatches loops and tasks that are poorly specified
Incidents with an agent action as a contributing factorFeeds your permission design

Review these with the team every few weeks during rollout. When an agent action does contribute to an incident, run the same review you would for any other cause; see blameless postmortems.

Common questions

Can an agent merge its own pull requests?

It can if you let it. Most teams keep merge with a person and enforce that through branch protection. Decide deliberately, and write the decision down.

Who is accountable for an agent's change?

The person who assigned the task and the person who approved the merge. An agent cannot hold responsibility. In regulated work this needs to be explicit; see AI in regulated engineering.

Should agents have access to production?

Read-only access to logs and metrics can help during incidents. Write access to production raises the stakes considerably; most teams require a person to approve each such action.

Will agents replace junior engineers?

Teams still need people who will become the senior engineers of the future. Agents change what early career work looks like; they do not remove the need to grow people.

Last reviewed 2026-09-17