The agentic software factory: Why it needs a harness

Part 3 of 5: The Agentic Software Factory


At the end of Part 2 we had a factory floor. Bootable repo, written context, a standard task shape, isolated workspaces, gates, station definitions, permissions on paper, and a register. It works. It also depends on every agent session actually reading the station definition, actually respecting the scope, and actually running the gates before announcing, with total sincerity, that it’s done.

Most of the time, they will. “Most of the time” is not how you run a line. It’s how you run a lottery. This post is about the piece that turns rules on paper into rules that hold: the agentic harness.

What a harness actually is

A model by itself does exactly one thing. You send it text, it sends text back. That’s it. Everything that makes it an agent lives in the program wrapped around it:

  • The loop. Send context, receive a response, and if the response asks for a tool, run the tool and send the result back. Repeat until done.
  • The tools. Reading files, editing files, running commands, searching, calling APIs, talking to MCP servers.
  • The permissions. Which tools are allowed, on which paths, with which arguments, and which ones need a human to approve.
  • The context management. What gets loaded at the start, what gets summarized when the conversation gets long, what gets carried into the next session.
  • The hooks. Your own code that runs at defined points: before a tool call, after a tool call, when the agent tries to stop.
  • The limits and the record. Turn and time budgets, cost tracking, and a log of everything that happened.

That wrapper is the harness. Claude Code is a harness. So is every other coding agent CLI and IDE agent you have used. When people argue about which agent is “better,” a surprising amount of what they are really comparing is the harness, not the model. (The internet will not be told this. I’m telling you anyway.)

The reason this matters for a factory fits in one line:

A prompt is a request. A harness is a guarantee.

“Do not edit files outside src/orders/” in a prompt is something the model will usually follow. The same rule in the harness is something it cannot break.

How you could do it

There are four realistic ways to get a harness for your factory, from least to most work.

1. Configure the coding agent you already use. Most serious coding agents now expose the harness through configuration: permission allow and deny lists, hooks, subagent definitions, reusable skills, and project-level instruction files. In Claude Code that is .claude/settings.json, .claude/agents/, skills, and CLAUDE.md, all checked into the repo. This gets you a long way with zero custom code, and it is where I tell everyone to start.

2. Drive the coding agent headlessly from scripts. The same agents can run non-interactively. You hand them a prompt, a set of allowed tools, and a turn limit, and get structured output back. That turns each station into a command your automation can call:

claude -p "$(cat .factory/stations/reviewer.md) Task: #482" \
  --allowedTools "Read,Grep,Glob,Bash(make test)" \
  --max-turns 40 \
  --output-format json > review-482.json

Now a station is a process with an exit code and a JSON result. Your CI system or a small orchestrator can chain them, and nobody has to babysit a chat window.

3. Build on an agent SDK. When you want your own orchestrator, with stations as functions, custom tools, and your own state, an SDK like the Claude Agent SDK gives you the same loop, tools, permissions, and hooks that power the CLI, as a library. You write the factory logic. The SDK handles the agent mechanics.

4. Write the loop yourself against the raw API. You can. The tool-use loop is not complicated. But you will end up rebuilding file editing, context compaction, permission prompts, and sandboxing, and those are full of sharp edges that someone else has already bled on. I only go here for very specialized agents that do not touch a codebase.

My honest recommendation: start at 1, add 2 as soon as you want stations to run without a human pressing go, and move to 3 when the orchestration logic outgrows shell scripts. Skip 4 unless you have a strong reason, and “it’d be fun” is not a strong reason. (It is a reason. Just not a strong one.)

What I would put in it

Here is what my harness layer does for the factory, regardless of which of those four paths is underneath.

Load the station, not just the prompt

Each station has a definition file from Part 2. The harness loads it as system-level instructions, along with the root agent guide and the ADRs linked from the task. The agent does not get to decide whether to read the conventions. They are in its context before its first turn.

Enforce scope with a hook

The task issue lists the paths a writer may change. The harness writes those into the workspace when the station starts, and a hook checks every edit against them before it happens. In Claude Code that is a PreToolUse hook:

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [{ "type": "command", "command": ".factory/hooks/enforce-scope.sh" }]
      }
    ]
  }
}
#!/usr/bin/env bash
# .factory/hooks/enforce-scope.sh: block edits outside the task's scope.
path=$(jq -r '.tool_input.file_path' | sed "s|^$PWD/||")
while IFS= read -r pattern; do
  [[ -z "$pattern" ]] && continue
  [[ $path == $pattern ]] && exit 0
done < .factory/task/scope.txt
echo "$path is outside this task's scope. Stop and report what you need changed." >&2
exit 2

Exit code 2 blocks the tool call and hands the message back to the agent, which then either finds a way to stay in scope or stops and asks. That one hook prevents most of the “while I was in there I also refactored the auth module” diffs that eat review time. You know the ones. Forty files changed, two of them related to the ticket.

Refuse to stop on a red gate

The other hook I lean on runs when the agent tries to finish. It runs the fast gate, and if anything fails, it blocks the stop and feeds the failures back. The agent cannot report “done” with a failing test. No more “All tests pass! ✅” sitting directly above a wall of red. This is the single most effective quality control I have added, and it is about ten lines of shell.

Hold the permissions per station

The permissions from Part 2 become configuration. The planner and reviewer get read-only tools plus the test command. The implementer gets write access inside its workspace and the gate commands. Nothing in the line gets deploy credentials or production database access. Network access is limited to the package registry and whatever internal services the tests need. If an agent asks for something outside that, it is a human decision. I made the longer version of this argument in security was already a mess, and nothing since has made me less paranoid.

Budget every run

Turn limits, wall-clock timeouts, and a cost ceiling per task. When a run hits a limit, the harness stops it and records a checkpoint instead of letting it spiral. In the long-running agents post these were tripwires a human watched. In the harness they trip themselves. It’s the same leash I put on the research agent on a budget, just applied to every station.

Demand structured handoffs

Every station ends with a structured result: what changed, which gates passed, what is unresolved, and what the next station needs. JSON for the machine, a short summary for the human. The next station gets the handoff and the source files, not the previous agent’s whole transcript. That keeps each session’s context small, focused, and free of the last agent’s abandoned guesses and half-remembered theories.

Record everything

Every tool call, every hook decision, every gate result, every handoff, tied to the task ID. When something goes wrong, the Learn station needs evidence, and “the agent did something weird yesterday” is not evidence. It’s a campfire story.

The harness wraps the model: station definition and context go in, tools pass through permission and scope hooks, the stop hook runs the gate, and a structured handoff comes out

The benefits, concretely

You can run a factory without a harness layer. You will be relying on prompts and attention, and attention is the thing you were trying to free up in the first place. Here is what the harness buys you.

Rules become guarantees. Scope, permissions, and gates go from “usually followed” to “enforced.” That is the difference between hoping for consistency and having it.

Repeatability. Every implementer starts with the same context, the same tools, the same limits, and the same hooks. Two tasks of the same shape get handled the same way, whichever developer kicked them off and whichever day of the week it is. That is where consistency across a team actually comes from. Not from a wiki page titled “Best Practices (DRAFT) (v3) (FINAL).”

Humans review less noise. When the line has already blocked out-of-scope edits and refused to stop on red gates, the human at the integrate station sees changes that are on-plan and green. Their attention goes to design and behavior, which is where it is worth the most.

Safety you can explain. When a security reviewer or a compliance person asks “what can the agents actually do,” you can show them the configuration and the logs. “We told it not to” does not survive that conversation. “It cannot, here is the policy, and here is the audit trail” does.

Swappable parts. Because station definitions, hooks, and gates live outside any single model, you can change the model behind a station, or run two side by side and compare, without rewriting the factory. When a new model ships (so, Tuesday), you test it against the same line and the same evidence instead of against vibes.

Cost control. Budgets and smaller per-station contexts keep token spend predictable. Runaway sessions get stopped by the harness instead of discovered on the invoice. I went deep on the cost side in making LLM features cheap enough to actually ship, and the same math applies here.

A place to put lessons. When the Learn station finds a defect pattern, the fix is often a new hook or a new gate check. The harness is where the factory’s memory of its own mistakes accumulates.

A word on overbuilding

It is very easy to get excited here and build an elaborate orchestration platform, with a dashboard, a plugin system, and a logo, before the line has run a hundred tasks. Do not. The harness should grow in response to real leaks. Start with the scope hook, the stop gate, per-station permissions, and turn limits. Add the rest when a real failure tells you to.

On Monday in Part 4 we take the stations, now wrapped in a harness, and make the whole factory boot itself: environments, workspaces, agents, and queues, the same way every time, without someone typing the startup sequence from memory and a sticky note.

The agentic software factory: Building the floor

Part 2 of 5: The Agentic Software Factory


In Part 1 I laid out the premise: humans own intent and design, agents own throughput, and the factory is the set of stations and checks that connects the two. That is a nice paragraph. Nice paragraphs have never once shipped software. This post is the part where we pour the concrete.

The steps below are in the order I actually do them, and the order matters. Every team I have watched try this out of order ends up with fast agents producing fast inconsistency, because they automated the line before the line existed. Automating chaos just gets you chaos with better uptime.

Step 0: Pick one repo and one kind of work

Do not start with the whole organization. I know. The slide deck says “enterprise-wide transformation.” Ignore the slide deck.

Pick one repository that matters, has a reasonable test suite, and has a team that actually wants this. Then pick one class of work to run through the factory first. Bug fixes with a reproduction are a great start. So are small, well-understood features like “add a field end to end” or “add an endpoint that follows the existing pattern.”

The goal of the first few weeks is not throughput. It is finding out where your line leaks.

Step 1: Make the repo bootable

An agent cannot verify anything it cannot run. Before anything else, the repository needs a single, documented, boring way to install, build, test, and run the application locally. If a new human hire needs a Slack thread and a senior engineer’s afternoon to get a passing test run, an agent is going to burn an hour of tokens rediscovering the same tribal knowledge, and then guess. Confidently.

I wrote a whole post on agent-ready local environments, so the short version here:

make setup     # dependencies, local services, seed data
make test      # the fast suite, under a couple of minutes
make check     # lint, types, format, the stuff CI will yell about
make run       # the app, on a port you can configure

Whatever your stack calls these, they need to exist, work from a clean checkout, and be the same commands CI runs. If they are not the same commands CI runs, the agent will pass locally and fail in CI, and you will spend your review time on the difference. Ask me how I know.

Step 2: Write down the context

This is the step people skip, and it is the one that makes the biggest difference to consistency. Agents start every session with no memory of your team. None. Whatever they need to know about how you build software has to live in files they will read.

I have been on about this for a while: AI is forcing docs to finally grow up, and the teams that treat documentation as a product are the ones whose agents behave. Turns out writing things down was a good idea all along. Who knew. (Everyone. Everyone knew.)

I keep four kinds of context:

  • An agent guide at the root. AGENTS.md, CLAUDE.md, or whatever your tooling picks up automatically. Keep it short. What the system is, how to run it, the five or six rules that get broken most, and pointers to everything else. If it is longer than a couple of screens, agents and humans both stop reading it carefully. Humans just stop sooner.
  • Conventions with reference implementations. “Use the repository pattern” is weak. “New repositories look like src/orders/OrderRepository.ts, including how errors are mapped and how tests are structured” is strong. Point at real code. Agents copy examples far more reliably than they follow prose.
  • Architecture decision records. Short documents that say what was decided, why, and what was rejected. These are what keep an agent from “helpfully” introducing a second HTTP client or a shiny new state management library. If your team does not write ADRs, start with the three decisions you have had to re-explain most often. You know the ones.
  • A domain glossary. The words your business uses, what they mean, and which ones are easy to confuse. “Account” versus “customer” versus “tenant” causes more agent mistakes than any language feature ever will.

I like keeping the cross-repo parts of this in a notes repo for shared project context and the repo-specific parts right next to the code.

Step 3: Define the unit of work

Every task that enters the factory needs the same shape. I use an issue template along these lines:

## Goal
One or two sentences. What is true when this is done?

## Acceptance criteria
- Observable behaviors, each one testable.

## Scope
- Paths, modules, or contracts this task may change.

## Out of scope
- Things that look related and must not change.

## Decisions that apply
- Links to ADRs and conventions.

## Stop condition
- When to stop and ask instead of continuing.

This is the input spec for the build station. It is also a gift to the human reviewer, who now knows exactly what they are checking the diff against instead of reverse-engineering intent from the code. Most of the time an agent can draft this from a rough request and a human tightens it. That draft-then-approve pattern is the ask, plan, confirm loop applied at intake, and a close cousin of the chat-first spec method I wrote up last year.

If a task cannot be written in this shape, it is not ready for the factory. Send it to a human for design, or split it. “Make checkout better” is a wish, not a task.

Step 4: Isolate every writer

Each implementer agent gets its own workspace: its own worktree or clone, its own branch, its own ports, and ideally its own database or schema. Shared mutable state between parallel writers is where most of the confusing failures come from. Two agents pointing tests at the same local database will each conclude the other one’s data is a bug, and then they’ll both “fix” it. Delightful.

Isolation also means scoping. The task’s “Scope” section in Step 3 is not decoration. In Part 3 we will have the harness enforce it, but even before that, it tells the reviewer what a suspicious diff looks like.

Step 5: Build the gates

Gates are the checks a change must pass to move to the next station. They need two properties: they run automatically, and they cannot be talked past. Not by the agent, not by a deadline, not by “it’s just a one-liner.”

I split them into two tiers:

  • The fast gate runs inside the build station, as often as the agent wants. Format, lint, type check, and the unit tests for touched modules. Under a couple of minutes. This is the agent’s own feedback loop, and the faster it is, the less the agent guesses.
  • The full gate runs before a change is handed to review. The whole test suite, integration and contract tests, a dependency and secret scan, a build of the deployable artifact. This is the same thing CI runs.

Then add the checks that encode design, not just correctness. These are the ones that hold consistency at scale:

  • Contract tests for every API and event other code depends on, so a “small refactor” that changes a response shape fails loudly instead of in production.
  • Architecture tests where your stack supports them, like “the domain module does not import from the web module.” Cheap to write, and they catch a whole category of agent drift.
  • Migration checks that run schema changes forward and back against a copy of realistic data. Agents have a well documented fondness for the destructive change at 2:13AM. Gate it.

A test an agent wrote and then quietly deleted is not a gate. The gates live in the repository and in CI, and changes to them get the same human approval as changes to a contract.

Step 6: Define the stations as files

This is where it starts feeling like a factory. Each station gets a definition: what it receives, what it does, what it produces, which tools it may use, and when it stops. I keep these in the repository so they are versioned and reviewed like code, because they are code. Just written in English.

.factory/
  stations/
    intake.md        # turn a request into a scoped task
    planner.md       # turn a task into an approved plan
    implementer.md   # build one slice in an isolated workspace
    reviewer.md      # read a diff against plan + conventions
  gates/
    fast.sh
    full.sh
  register.md        # who is working on what, right now
AGENTS.md
docs/adr/
docs/conventions/

A station definition is short. Here is roughly what my reviewer looks like:

# Reviewer station

Input: a branch, the task issue, the approved plan.
Read: AGENTS.md, the ADRs linked in the plan, docs/conventions/.

Do:
- Compare the diff to the plan. Flag anything outside Scope.
- Check new code against the reference implementations.
- Check tests cover each acceptance criterion.
- Report findings with file and line, severity, and the rule broken.

Do not:
- Edit code. A fix is a new implementer task.
- Approve. A human integrates.

Output: a review report on the pull request.

Notice the reviewer does not fix things. Keeping the writer and the checker separate is the whole point of a second station. If the reviewer fixes things, you have one agent with extra steps and a fancier name.

Step 7: Give each station the least it needs

The planner needs to read the code and the docs. It does not need to write files or run migrations. The reviewer needs to read a diff and maybe run the tests. The implementer needs to write inside its workspace and run the gates. Nobody in the line needs production credentials. Nobody. Not even “just for this one debugging session.”

Write these permissions down per station. Right now they are policy. In Part 3 the harness turns them into enforcement, which is a much stronger guarantee than “the prompt said not to.”

Step 8: Keep a register

The last piece is a visible list of what is in flight: task, station, owner, workspace, the paths and contracts it owns, state, and the next decision. I described this in the post on keeping long-running agents on track. A markdown table in the repository works to start. A label scheme on your issue tracker works too. The point is that anyone, human or agent, can answer “is somebody already changing the orders contract?” before starting, not after the merge conflict.

Step 9: Run it by hand for a week

Here is the step that feels slow and saves the most time. Before automating anything, run the line manually. A human picks a task, starts a planner session with the station definition, approves the plan, starts an implementer, runs the gates, starts a reviewer, and integrates. Like an animal.

You will find out fast where it leaks. The conventions doc is missing the thing every agent gets wrong. The fast gate takes eleven minutes. The issue template has no place for “this endpoint is called by the mobile app, which we cannot redeploy for two weeks.” Fix the line each time. That is the Learn station doing its job before the factory even has a conveyor belt.

Where we are

At this point you have a factory floor: a bootable repo, written context, a standard unit of work, isolated workspaces, gates that cannot be skipped, station definitions, permissions on paper, and a register. Agents can run in it. Humans are still turning every crank.

Tomorrow in Part 3 we add the piece that turns stations on paper into stations that actually behave: the agentic harness. Then on Monday, in Part 4, we make the whole thing start up on its own.

The agentic software factory: The premise

Part 1 of 5: The Agentic Software Factory


Most teams adopted coding agents the same way. Somebody installed one, it wrote a function faster than they could, and within a month everybody had one. A year later the team has a dozen agents, a pile of half-reviewed pull requests, three slightly different ways of writing a repository class, and a nagging feeling that they are typing a lot less but shipping about the same.

Congratulations, you’ve automated the part of the job that was never the bottleneck.

That is not a tooling failure. It is a structure failure. An agent is a very fast worker with no memory of yesterday, no sense of the team’s taste, and no idea which parts of the system are load bearing. Handing every developer one of those without changing how work flows is like handing a woodshop a CNC machine and parking it in the corner next to the hand saws. You get some nicely cut parts. You do not get a different shop.

This series is about building the different shop. I call it an agentic software factory, and over the next week I want to lay out what it is, how I set one up, why it needs a harness, how to get it to start itself, and how the whole thing fits together so development gets dramatically faster without the codebase turning into soup.

What I mean by “factory”

The word makes some developers flinch. Factories conjure images of identical widgets, a punch clock, and people reduced to button pushers. Fair. That is not the part I am borrowing.

What I am borrowing is this: quality is a property of the line, not of heroic individuals. A good factory does not rely on the best machinist catching every defect by eye at 4:55pm on a Friday. It has stations with clear inputs and outputs, jigs that make the right cut the easy cut, inspection built into the flow, and a feedback loop that fixes the line when a defect shows up instead of just fixing the part.

Software teams have always wanted that. We just could not afford most of it. The extra test harness, the contract tests, the architecture decision record, the second review, the migration rehearsal: all of that cost human hours that were already spoken for. So we skipped it, and relied on the senior folks to catch problems in review. (How’s that been going? Yeah. Same.)

Agents change the cost of that work. The tedious, well-specified, verifiable parts of software development are exactly what they are good at. That means the “extra” stations that made a line high quality are suddenly cheap. The factory is what you get when you take advantage of that on purpose instead of by accident.

The core premise in one paragraph

Humans own intent and design. Agents own throughput. The factory is the set of stations, rules, and automated checks that connects the two, so every change an agent produces is shaped by the team’s design decisions on the way in and verified against them on the way out. Speed comes from running many small, well-scoped tasks in parallel with very little waiting. Quality comes from the line refusing to pass work that does not meet the bar, regardless of who or what wrote it.

Everything else in this series is detail on that paragraph. If you only read one thing in this series, make it that one.

It is also, not coincidentally, the same shift I was poking at in the principal engineer in the agentic era and how architects are evolving with AI. The senior work moves toward deciding and shaping. The factory is what makes that move structural instead of aspirational.

The stations

A factory is easier to reason about when you name the stations. Mine look roughly like this:

  1. Intake. Work arrives as an issue, a bug report, a spec, or a product request that is one sentence long and somehow also urgent. Intake turns it into something with a clear goal, acceptance criteria, and scope. Humans write or approve this. An agent can draft it.
  2. Design. For anything beyond a trivial change, the work gets a short plan: which modules change, which contracts move, which decisions apply. This is where the team’s architecture decision records, conventions, and domain language get pulled in. A human approves the plan for anything that touches a contract, a schema, or a security boundary.
  3. Build. An implementer agent takes one approved, scoped slice and makes it real in an isolated environment. It writes the tests first or alongside, and it stops at the edge of its scope.
  4. Verify. Automated gates run: build, lint, types, unit and integration tests, contract tests, security scanning, whatever your stack can check by machine. Then a separate reviewer agent reads the diff against the plan and the conventions and reports problems with evidence.
  5. Integrate. A human looks at the verified change, with the plan, the gate results, and the reviewer’s report in front of them. They merge or send it back. Release mechanics take it from there.
  6. Learn. When something gets through that should not have, the fix goes into the line: a new check, a sharper convention, a better station definition. Not just a patch on the one bad change and a stern Slack message.

None of those stations are new. Every team that ships well has some version of them. What is new is that most of the labor inside stations 1 through 4 can be done by agents, in parallel, all day, while humans spend their attention on the decisions at the edges of each station.

The six stations of an agentic software factory: intake, design, build, verify, integrate, learn, with humans owning the gates between them

Where the speed actually comes from

I want to be careful here, because “agents make you 10x faster” claims are everywhere, and most of them are measuring lines of code, which is a bit like measuring a restaurant by how many plates it breaks.

The speed in a factory does not come from an agent typing faster than you. Typing was never the bottleneck. The speed comes from three places:

  • Parallelism with containment. When work is cut into small, well-owned slices with isolated environments, you can run several at once without them stepping on each other. I have written about worktrees for parallel agents and why worktrees alone are not enough. The factory is the structure that makes the parallelism safe instead of merely exciting.
  • Removing waits. A lot of delivery time is waiting: for someone to write the test, for someone to review, for someone to remember how to boot the service again. In a factory the boring waits get filled by agents and the line starts itself. Humans wait less because there is always a verified change ready for a decision.
  • Fewer round trips. When the plan and the conventions are pulled in up front and the gates catch the mechanical problems before a human looks, review stops being a game of “you forgot the null check” for the fortieth time. Reviews get shorter and more about design.

Notice that none of these are about the model being smarter. A smarter model helps. A better line helps more.

Where the quality comes from

The usual worry is that more agent output means more defects reaching production. That worry is entirely reasonable. I wrote about the operational side of it last month, and about how security was already a mess before generative AI showed up to make it messier, faster. The factory answer is not “review harder.” It is to make the line enforce the things you care about:

  • Consistency comes from the design station loading the same conventions, examples, and decision records for every task, and from the reviewer station checking against them. The tenth agent writing a repository class sees the same reference implementation as the first.
  • Correctness comes from tests that are written as part of the slice, from gates that cannot be skipped, and from a reviewer that is not the writer.
  • Design integrity comes from humans owning plan approval for anything structural. Agents are very good at local optimization and very, very willing to invent a new pattern when an existing one is slightly inconvenient. A human gate on contracts, schemas, and boundaries keeps the architecture deliberate.

The rule I keep coming back to: an agent’s confidence is not evidence. Every station produces something a human or a machine can check. If it does not, it is not a station yet. It is a vibe.

What this is not

It is not “lights out” software development. There are humans in this factory, and they are doing the highest leverage work in it: deciding what to build, shaping the design, approving the plans, and making the merge call. What disappears is a lot of the low leverage work that used to eat their week.

It is not a single product you buy, no matter what the booth at the next conference tells you. Some of it is tooling you will adopt: a coding agent, a harness, a CI system. A lot of it is files in your repository: conventions, station definitions, decision records, scripts. The factory is mostly made of plain text and automation that already exists.

It is not something you build in a weekend either. You can get the first useful version up in a few days, then it improves every time a defect teaches you something. Which, if you’re like every team I’ve ever worked with, will be often.

The rest of the series

Here is where we are headed, one post per business day:

  • Part 2 (Thursday): Building the floor. The concrete setup steps, in order, from repository context to quality gates to station definitions.
  • Part 3 (Friday): Why it needs a harness. What an agentic harness is, how you could build or adopt one, and why it is the piece that turns a pile of agents into a line.
  • Part 4 (Monday): Starting it up without you. Automating the factory’s startup so environments, agents, and queues come up the same way every time.
  • Part 5 (Tuesday): How it all fits together. Following one change through the whole line, and where the speed, quality, consistency, and design practice actually come from.

If you are running more than a couple of agents today and the main feeling is busy, that is the signal. The agents are fine. They need a factory around them.

GitHub PRs are slow. Keep shipping anyway.

The issue is ready, the code is ready, and then the PR page spins. A check stays queued. A webhook arrives late. The review that should have taken ten minutes turns into an afternoon of refreshing GitHub and wondering which part of the pipeline is actually broken.

That is not hypothetical in October 2026. GitHub’s August 17 incident report says a 7 hour, 47 minute outage disrupted the site, APIs, Actions, pull requests, and issues. Its September availability report describes database pressure and work to contain failures in pull requests. The status history also records October delays across PRs, Issues, Actions, and webhooks. GitHub is doing capacity work. A development team still needs a plan for the hours when its work is waiting on that capacity.

Find the actual wait

“GitHub is slow” describes the feeling, not the bottleneck. Track issue ready to first code change, code complete to first review, review complete to checks, checks complete to merge, and merge to deploy. Look at the median and the ugly tail. A slow PR page is one problem. A two day review queue is another. A CI job that queues for an hour and runs for three minutes has a different remedy from a test suite that takes an hour on a ready runner.

This measurement matters because some delays are in our own process. If a task cannot start until somebody writes an elaborate issue, or a trivial change waits behind a weekly approval meeting, GitHub uptime will not fix it. Write the acceptance criteria and the risk in a short issue or local task note, then let implementation start. The artifact should help the next person understand the work, not become a ceremony the work must survive.

The delivery timeline separates local work, GitHub dependent review and checks, and deployment

Move the fast feedback close to the code

Make the build, focused tests, formatting, and relevant static checks runnable with one documented local command. Run them before opening the PR. A remote check is still useful as the shared attestation, but it should confirm a result developers can reproduce, not be the first place anyone discovers a compiler error. Cache dependencies carefully, keep the quick checks quick, and reserve expensive matrices for changes that need them.

Review can begin from a branch or a patch while the PR UI is unhealthy. A reviewer can read git diff, run the relevant tests, and write findings in a shared local note. When GitHub recovers, put that discussion on the PR so the decision remains visible with the change. Do not mistake a green local run for the required check on a protected branch. Branch protection is a team contract, and an outage is a poor reason to silently discard it.

Keep a second path for coordination

Issues are a convenient source of truth until the issue service is unavailable. Keep enough task context in the repository or another team owned system to continue: a task ID, expected behavior, owner, and decision log. It can be a small Markdown file. When GitHub returns, reconcile it to the canonical issue. Avoid two competing permanent backlogs.

Git itself is distributed. If GitHub’s web services are degraded but Git operations still work, teams can continue committing and exchanging branches through the remote. If Git operations are unavailable too, local commits keep the work safe. For a prepared contingency between trusted machines, Git bundles can carry repository history without a live server. A second forge or internal mirror can provide a more complete continuity path, but only if the team has already rehearsed access, review, and reconciliation. Setting one up during an incident is not a shortcut.

Self hosted Actions runners solve a different problem: where jobs execute. They still connect to GitHub for job assignments, so they do not remove the Actions control plane dependency. A locally runnable test script does. A separate CI system can, if its triggers and repository access are independent too.

Reduce the amount of GitHub work per change

A giant PR asks the platform and the reviewer to do too much at once. Keep changes small enough to inspect and merge. Separate mechanical cleanup from behavior changes. Use feature flags or compatible incremental changes so one PR need not contain the entire release. Avoid automations that trigger redundant workflows on every push, comment, label, and issue edit. They add queue pressure and make it harder to tell which signal matters.

This is also where agent output can hurt. An agent that opens a PR for every tiny correction can swamp reviewers and checks. One that generates a thousand file change is worse. The useful middle is a coherent slice with a clear behavior change and a reproducible local result.

Decide what happens during an outage before one happens

For ordinary work, keep committing, testing, and reviewing locally, then publish when service recovers. For urgent production work, use the team’s documented emergency path, including independent review, recorded test evidence, and a later audit trail. If branch rules require a specific bypass, make that an explicit incident decision by the people authorized to make it. Do not give agents broad bypass permission so they can “keep shipping.”

GitHub should remain a useful place to coordinate and verify work. It does not need to be the only place work can happen. The practical goal is a pipeline that can keep making safe progress when a PR page, webhook, or runner queue has a bad day.

AI code quality: Ship fast without the fires

The October 2025 DynamoDB disruption spread through AWS after a race condition in automated DNS management erased the service’s regional endpoint. Its published cause was an automation defect, not AI-written code. That distinction matters. If we blame every outage on an LLM, we miss the specific mechanisms that made the outage possible.

The AI-related cases are narrower and messier. Reporting connected an AI coding tool to an AWS Cost Explorer interruption, while Amazon attributes that event to misconfigured access controls and disputes the reported cause. In separate Amazon retail incidents, the company says an engineer followed advice an AI tool inferred from an outdated internal wiki. These cases do not prove that faster AI development caused AWS’s broad outage. They do show how stale context and excess authority can give an ordinary mistake operational reach.

There is a cleaner example. In 2025, Replit acknowledged that its agent deleted data from a user’s application database while development and production data were insufficiently separated. The data was restored, but the production application could have been broken during the recovery window. Replit’s response was to separate the databases by default and keep the agent away from production data during development. The system had given a development tool production reach.

Most failures look less dramatic. An agent adds a retry around a payment call without an idempotency key. It makes a slow query pass the unit suite by mocking the database. It replaces a boring, explicit validation rule with a generic helper that accepts an empty value. Each diff can look reasonable. Each can make the application worse. Generate enough of those diffs, and the review queue becomes an exercise in finding one dangerous sentence in a book that keeps rewriting itself.

The old gate is getting squeezed

The traditional bargain was that a developer made a change, a reviewer read it, CI ran, and the team shipped. Those steps still matter. The trouble is the arrival rate. Agents can produce plausible changes faster than a team can understand them. A reviewer staring at a giant generated PR is likely to check syntax and style, then miss the changed behavior. A test suite assembled by the same agent can reinforce the same mistaken assumption.

The answer cannot be “add three more approvers.” That makes the queue longer without making anyone better informed. The real unit of review needs to get smaller, and the evidence attached to each change needs to get better. I argued for small, scoped changes before the current volume of agent output made the problem obvious. A reviewable diff has one job, names its expected behavior, and says which failure modes it considered. A generated feature that rewrites twelve unrelated files needs to be split before it reaches a reviewer.

Put checks where mistakes enter

Start before code generation. Give the agent the current source of truth: the domain terms, the relevant files, the interface it must preserve, and the operations it may perform. If the design is unclear, ask for a plan and a list of unknowns first. My ask, plan, confirm workflow is useful here because it makes a change in authority visible. A read only investigation should not quietly become a production edit.

Next, make every implementation change answer three concrete questions in its PR description:

  1. What behavior changed for a user or another system?
  2. What happens when the dependency is slow, unavailable, or returns an unexpected result?
  3. How will we know the change is wrong after deployment, and how will we back it out?

Those questions are more valuable than a declaration that “all tests pass.” Tests need to exercise the behavior, including a failed request, a duplicate request, and a partially completed operation where those cases apply. A retry that works on the happy path can duplicate an order. A migration that passes locally can lock a table under production load. The test plan should follow the risk, not the quantity of generated code.

Then put hard boundaries around the places where a wrong answer is expensive. Development agents do not need production credentials. Migration agents do not need permission to destroy live data to draft a schema change. Deployments that alter durable state deserve a separate authorization step and a recovery rehearsal. The Replit incident makes that point more clearly than any policy memo.

Review the behavior, then the shape of the code

“Clean code” is too easy to reduce to formatting. I want a reviewer to trace the new behavior through the caller, the domain rule, the persistence boundary, and the observable result. Does the code use the team’s vocabulary? Does it duplicate a rule already implemented elsewhere? Does it leave a clear place for the next change? Is the error path understandable to someone on call at 2 a.m.?

An independent review helps when it has a specific lens. Ask one reviewer to look for changed invariants and another to check operational failure modes. Give both the actual diff and current contract. Do not ask the authoring agent to certify its own work with a cheerful paragraph. In additive, mutative, and destructive changes, I used those categories to make the impact of a diff easier to see. They also help decide how deep the review and rollout need to be.

Finally, use production as a feedback loop without treating customers as the test suite. Release behind a flag when practical. Start with a small cohort. Watch error rate, latency, saturation, and business outcomes. Have a known rollback path. If the change modifies data, confirm that rollback restores behavior even when old code meets new data. An automatic rollback triggered by a reliable signal beats a heroic incident call after everyone has gone home.

Change the throughput target

The target is not generated lines per engineer or PRs merged per day. It is useful behavior delivered without borrowing trouble from next week. Track how often a change needs a follow-up fix, how long failures take to detect, and how easily the team can restore service. If those numbers get worse while code output rises, the pipeline is accelerating in the wrong direction.

AI can make the first draft cheap. Understanding the system, containing the blast radius, and learning from what shipped are still the work. A faster keyboard makes those jobs more urgent.