Human in the loop for AI coding agents
AI coding agents at every phase of your SDLC, with the decisions at each one remaining with a human.
By: Benjamin Clark
Intent
This pattern assumes AI coding agents doing delivery work that spans several commits or sessions, with tickets in a tracker such as Jira or as files in a repo. It keeps a human in the loop at every phase of the SDLC: AI is a tool used at every stage, while humans retain creative control, and control quality and deployment. It's the workflow layer of Guardrails, skills and workflow for agents. This enables three outcomes:
- Someone stays accountable for what ships, because the decisions at every phase remain with a human.
- Every change arrives as a small commit, which a human reviews and either accepts, edits or pushes back on.
- Context persists beyond any single agent conversation, so any human or fresh agent can read the ticket and pick up where the work left off.
Motivation
AI coding agents write code quickly, but speed alone does not improve delivery. DORA's 2024 research found that AI adoption came with lower delivery stability and throughput, and that fundamentals such as small batch sizes remain crucial. Most teams still run agents from a chat, with no defined point at which a person decides, which fails in three ways:
- Accountability blurs. Decisions get made by the agent, or in a chat nobody can search, so nobody can say later who decided what, or why.
- Review stops being real. The agent takes on whatever it finds on the way, until changes are too large to check properly.
- Context is lost. A chat ends, so every session starts by explaining the task again, which spends a person's time on work already done.
This pattern rests on a simple truism: when something breaks, someone needs to be accountable, and a computer can never be held accountable. So the ticket names every point at which the agent stops for sign-off, and the work runs one small commit at a time: the agent writes the code, and a human reviews it. The usual quality gates are hardened rather than negated.
Applicability
Use this pattern when:
- AI agents do coding work that spans several commits or sessions.
- A human must stay accountable, retaining the decisions at each phase and controlling quality and deployment.
- Any session, or any person, should be able to pick the work up cold, without the chat that started it.
Do not use this pattern when:
- The work is a one-off that fits in one commit and one session, where writing a plan would take longer than the work it guides.
Structure
Participants
| Participant | Role |
|---|---|
| Person | Decides what is built, why and in what order, reviews every commit, and controls quality and deployment. |
| Log-ticket skill | Turns a request into a ticket, for the person to review. |
| Ticket | Holds the description, the agent's instructions and sign-off points, the commit plan and the acceptance criteria. |
| Start-ticket skill | Run by the person with a ticket number, and starts a fresh agent session. |
| Agent session | Works one ticket, building one planned commit at a time and stopping for review. |
Constraints and trade-offs
- Review alone isn't enough. Language models are non-deterministic, so the same request can produce different code each time, including code that looks right and isn't. Quality gates stay enforced alongside the human, rather than relaxed because a person is looking.
- The person is the bottleneck. Every commit waits for a review, which suits work where review is cheap and mistakes are dear, and smaller commits keep each wait short.
- Planning comes first. A commit plan takes time to write, and plans change, so keeping one honest means updating it before the work, at the cost of more ticket edits.
Part of how I deliver
This is how I keep people in charge of what AI agents deliver. It's one of many patterns I bring through contract delivery, and it works with whichever tracker your team already uses.
AI agents in your delivery, under control
I bring AI coding agents into engineering teams with the rules, workflow and standards that keep people in control of what ships. If your team is adopting them, book a call and we'll talk it through.
