Skip to main content

Running unattended is the hard part

Updated 14 min readMarkdown
Part of seriesAutonomous Delivery Field Notes
Running unattended is the hard part

Writing code was never the limit. Running with nobody present is, and people end up on the critical path in ways nobody planned for.

Part 4 of 5 in Autonomous Delivery Field Notes.

TL;DR

  • A local session has a person in it who quietly supplies missing context and sees trouble in seconds. A remote run starts cold, can't ask, and is only read about afterwards.
  • About half of failed verifications were caused by the machinery around the agents, not by the code they wrote. Agents cope quietly instead of reporting it.
  • Taking stuck work over by hand is a sound fallback and a poor habit. Unrecorded, it hides the reason the system got stuck.
  • "Autonomous" still meant about 800 human decisions a week. People become deciders, signers and unblockers, and the system waits on them.
  • Late in the programme, finished work stopped not in the agents but in the joins between systems.

When a remote run got stuck, the team's usual answer was simple. Someone pulled the work down to their own machine, finished it there, and moved on.

It worked. It was usually quick. And it was, I now think, the single most informative thing happening on the programme that nobody was recording.

Here's the other end of the same problem. An item was waiting on a person to sign a waiver. It wasn't failing. It was waiting. The scheduler couldn't tell the difference, so it did what it does with incomplete work. It dispatched a fix agent. That agent couldn't fix it, because there was nothing to fix. The scheduler dispatched another. Then another.

Twenty-five consecutive fix attempts, on an item that needed one signature.

Between those two stories (people quietly rescuing work, and the system loudly retrying work only people could close) is most of what I learned about running autonomous delivery without someone at the keyboard.

As throughout this series, every figure is from one programme, mostly from a partial month when unattended builds had just started. These are illustrations of mechanisms, not benchmarks.

Why remote is harder than local

Before going into the failures, it's worth saying plainly why this is hard, because the intuition that "it worked on my machine, so it'll work on the runner" is very strong.

A local agent session has a person in it. That person supplies missing context without thinking about it. They have the credentials. They notice within seconds when something is off, and they redirect. They're also a source of judgement: "no, not that file, the other one".

A remote run has none of that. It starts cold. It can't ask. Nobody sees it as it happens. It's read about afterwards, if at all. And it inherits every problem of a distributed system on top: leases, concurrency limits, timeouts, resource ceilings.

Everything implicit on a laptop has to be declared for a runner.

Half the failures aren't about code

When we classified the causes of 490 failed verifications, the picture was not what anyone expected.

Cause of failed verification Share
The system's own gate checks 45%
CI red or unreadable 25%
No usable output from the run 19%
The run crashed 6.5%
Other 5%

Strip out the gate checks, which are at least partly about the work itself, and about half of all failed verifications came from the machinery: CI that was red or unreadable, runs that produced nothing usable, and crashes. The harness was as large a source of failure as the agents' work.

That matters for a practical reason. If you don't measure harness failures separately, you'll blame the agents for them, and you'll spend your effort on prompts when you should be spending it on infrastructure.

Some of the specific forms:

The cold environment. Build recipes assumed tools and logins that existed on a developer's machine and were absent on the remote runner. The agents reported the target as unreachable, which was true and unhelpful. The fix was one route that works in both places, plus an instruction to switch route before reporting failure.

Grading too early. The verifier recorded a permanent fail while required CI checks were still running. In orchestration, timing is a correctness issue. The verifier now waits for required checks to finish.

Version skew. Developer tooling and the hosted system were running versions dozens of releases apart. Updates had been announced but weren't applied automatically. A system that changes daily needs version discipline at every seat, so a mismatch is now flagged at the start of every session.

A check the agent never runs. The code host's formatting check failed two attempts on the same four lines. Each time, the agent rewrote those lines the same way, because it never ran the formatter itself. A person pushed the four-line fix. Any check that runs only in the code host will keep failing the agent until the agent runs it too.

Successful coping is the quietest failure

This one deserves its own section, because it's the hardest to see.

Agents that were short of memory and disk didn't fail. They nursed their environment. They cleared caches, retried, worked around, slimmed down what they loaded. For hours. Runs took about six times as long as they should have. Nothing went red. None of three parallel runs reported the problem.

From the agent's point of view it had succeeded. From the system's point of view everything was green. From a cost and throughput point of view it was a disaster that nobody could see.

The rule we added was that managing your own environment counts as friction, and must be recorded as such. But the general lesson is bigger than one rule: agents fail quietly and confidently. They cope, work around and report success. Every interface has to be designed so that failure is loud, including the failure of "I got there, but it was a struggle".

Retries with falling odds

When something fails, the instinct is to try again. For agents, the numbers say that instinct needs a limit.

Attempt Share that passed verification Sample
First 36% 173
Second 27% 100
Third 20% 66

Each further attempt was less likely to pass than the one before. Acceptance attempts fell faster: 18%, then 6% and 8%. After an attempt that produced no usable output, the next attempt passed only 7.5% of the time (4 of 53).

Across the programme, 60% of agent run time (640 of 1,070 hours) was spent on attempts that passed. So about 40% of the compute went to attempts that were thrown away.

The reason is straightforward once you see it. A retry starts cold and repeats what the last one did. If the cause of failure was in the environment, the specification or a dependency, a fresh attempt hits the same wall. A failed attempt is information. Change something before trying again, cap the number of attempts, and escalate after that. Some work should simply stop being retried.

And a related failure: retries throw away good work. A failed attempt wasn't resumed. The next one started from the main branch, its change was closed and its closures were undone. In one case the second attempt had been green on every required check and was blocked only by findings a person needed to settle. It was discarded anyway. When a run is green apart from items only a person can resolve, pausing to ask is far cheaper than starting again.

Loops and noise eat attention

Unattended systems generate a lot of activity, and activity is easy to mistake for progress.

Review that never converges. Three review rounds produced 39 findings, of which 5 were real, nearly all in round one. Each fix triggered another round, which found new nits, which triggered another fix. Automated review needs a stopping rule. Ours became two rounds, after which remaining items are filed as tracked findings. Defects that would ship are still fixed.

Duplicate findings. One root cause was filed 11 times. After a clean-up, 22 of 39 closed findings were filed again 15 minutes later, because the next audit saw the same symptoms and had no way to know they'd already been dealt with. Without identity for defects, the backlog measures activity, not risk. Findings are now keyed by what is wrong and where, not by when they were seen.

Retrying what only a person can close. The 25 attempts from the opening. Work held for a person is now excluded from dispatch. The scheduler has to know the difference between failing and waiting.

People become the bottleneck

Here's the number that reframed the whole programme for me. In one week, the system recorded 797 decisions made by people, 231 made by machine, and 35 corrections.

"Autonomous" still meant hundreds of human decisions a week. A fairer description of what we were running is delegated execution under human direction.

That's not a criticism. It's just where the work goes. People's jobs shifted from writing code to:

  • Deciding: ruling on escalations, exceptions and open questions, often in batches.
  • Signing: approving designs before build and deployments after it.
  • Shaping work: turning rough intent into epics and features precise enough for agents.
  • Unblocking: chasing dependencies between teams.
  • Tending the system: reporting defects in the delivery system and maintaining its rules and checks.
  • Holding coherence: keeping the whole product consistent across teams.

And as volume rose, the system increasingly waited on them. Time blocked, as a share of time in progress, went from 2.3% to 12.5%. Runs paused for hours on owners who were away for the weekend.

The interfaces between people and the system broke in predictable ways:

  • Answers that don't arrive. A person approved something. The system kept showing it as waiting for two days. The route from a human decision back into the system is critical path, and it has to be tested end to end like any other critical path.
  • Planning has its own failures. A quick "yes" taken as a considered answer. Questions too abstract for anyone to answer well. Wrong facts put to the person doing the planning.
  • Decisions that don't outlive the run. I'll come to this one in a moment, because it's the most expensive.

Throughput, in the end, was limited by how fast people could decide. That's a staffing and organisation question more than a tooling one.

One feature's day

The failures I've described so far fall into neat families. Late in the programme, one feature had a day that didn't fit any of them, and it's the best illustration I have of where autonomous delivery actually stops.

The feature took four build attempts in one day. Only the fourth passed. It then needed a person to merge it. None of the failures was in the code.

No system owned the whole feature. It lived in a portfolio planning tool, a work tracker, the code repository and the delivery system, each copying fields from its neighbour on its own schedule. It had five identifiers. At one moment it was merged in the code host, still building in the delivery system, and unchanged on the board.

Rulings didn't outlive the attempt. A person ruled on 41 open findings. Those closures were carried out by the running attempt, so when the attempt failed they were undone. Open findings on the feature went from 18 to 85, then to over 250. The person's decisions had been stored as a side effect of a run, and the run was thrown away. The fix was a person-level marker that keeps a finding open but stops it blocking, and closes it when the work merges. A decision a person makes must be stored as that person's.

The same finding, every attempt. Each attempt audited the design clause by clause. Clauses that can only be proven once a feature is switched on were filed afresh every time, and blocked every verdict. "Cannot be proven yet" is a known state, not a new defect. The system needs a way to say so once.

The main branch moved under the build. While the fourth attempt ran, a neighbouring team's change removed a field it still used. The neighbour's new guard test flagged it after the verdict. A passed change now couldn't merge. Re-base and re-test after the verdict, not only before.

Sign-offs discovered at the end. The design named two sign-offs from other teams. Nobody recorded them until the build finished, at which point the owner put a merge hold on the change. A person-owned step that isn't tracked from the start becomes a hold at the worst possible moment.

Passed, but never merged. To merge, the delivery system had to ask the code host whether a change could merge. The host throttled those reads while the main branch moved every few minutes, so verified changes were never armed. Nine verified changes sat unmerged at once. People merged three of them by hand.

Merged, but not recorded. The same failed read meant the delivery system never saw some merges happen. Code sat on the main branch for hours while the system still showed the feature as building, and six dependent features stayed held behind it. Only the platform could record the merge. No person could do it from their own seat.

Guards built for agents blocked the rescue. When people stepped in, a secrets check blocked them committing a public settings file the merge had brought in, and the merge check counted automatic CI comments as unanswered review threads.

Read that list again and notice what's missing: anything about the agents' ability to write software. The last mile of autonomous delivery is an integration problem. It inherits every weakness of the tools it's bolted onto.

Takeover is a measure, not just a fallback

Which brings me back to the person pulling stuck work down to their laptop.

That rescue is a perfectly good fallback. The problem is that, unrecorded, it erases the reason the system got stuck. The work completes, the dashboard goes green, and the cause is lost. On the programme we didn't measure the takeover rate. That's the honest gap in this section: it was reported by the team, not counted.

If I were starting again, I'd treat takeovers the way self-driving programmes treat disengagements: every time a person takes control, you log it, with a reason. Then you hold local completion to the same gates and evidence as remote completion, so the rescue doesn't become a way around the controls. The rate of takeovers over time is, I think, the best single measure of whether an autonomous delivery system is actually ready to run alone.

Two measures to start tracking

If you're running agents unattended, or planning to, start counting these two things now. You'll learn more from them than from any throughput chart.

  1. How often people take work over, and why. Every takeover gets a reason, even a one-word one. Classify them. The top three reasons are your roadmap.
  2. How long the system waits on a human decision. Measure the time from "needs a person" to "person answered, and the system saw the answer". Watch for the second half. In our case, the answer sometimes took two days to arrive after it was given.

And alongside them, keep harness failures counted separately from code failures. If you can't tell the two apart, you'll keep fixing the wrong one.

Next, the closer: given all of this, when should you use a system like this, and what should be true before you do? When to use it, and what to have in place first.


Series: Autonomous Delivery Field Notes

  1. "Done" is a claim, not a fact
  2. Autonomy is a property of the specification
  3. You are building two products
  4. Running unattended is the hard part (this post)
  5. When to use it, and what to have in place first

The views, opinions, and technical perspectives expressed in this article are entirely my own and do not represent those of my employer or any affiliated organisation.

2 views

No comments yet. Be the first to comment.

Autonomous Delivery Field Notes

Part 4 of 5

Five lessons from four months of running autonomous, agent-driven software delivery on a real multi-team programme: what worked, what broke, and what to have in place before you try it.

Up nextWhen to use it, and what to have in place firstAutonomous delivery is very good at bounded, well-specified, checkable work. Deciding to adopt it is mostly a question of readiness. Part 5 of 5 in Autonomous Delivery Field Notes. TL;DR These system