Skip to content
Amila

Palahepitiya Gamage Amila · Weekly Learnings

The agents weren't the slow part. I was.

· Palahepitiya Gamage Amila

Streams of champagne-gold light flowing quickly across an aubergine background and gathering at a single narrow lit doorway.

A few weeks ago I opened the log for one of my AI agents and saw it had been stuck for hours. It had a handful of questions for me. I answered them in a few minutes. It had just never told me it was waiting.

Some context. I work as a fractional CTO for a few startups, and I run a set of AI agents that plan, build and check software alongside me. That afternoon changed how I set them up.

The job

The work was a rebuild of an older business system, for web and mobile, for a client that makes software for field-service teams. Before we could plan anything, we had to find out what the old system actually did.

So I gave one agent the job of studying the old system first. It worked from a short brief that listed every part it was allowed to open, who owned that part, and a note that the owner had agreed. Only the client's own code went on that list. Other companies' libraries were listed by name and left alone. Looking at competitors was a separate, optional step, and only covered what they publish on the web.

The agent wrote up what it found: the main parts of the system, the data, and where the business rules sat. We used that write-up as research to write the requirements for the new system. It had gaps. The biggest pieces were too large for the tool to read in full, so a person still had to fill those in.

Two more research steps followed. One looked at the market and competitors. The other looked at how AI could change the work the system supports, because I didn't want to rebuild what the job looked like five years ago.

Some rules stayed fixed the whole time. I approve every step before the next one starts. Agents never push code. Client data stays on our machines and is read only. And spending limits go up a little at a time.

What happened when it ran

The plan went through many versions before I approved it. Each time, a second agent whose job is to find problems pointed out what was wrong, and the next version fixed it.

Then the build started. Across five chunks of work, the agents that write the code spent about 16.5 minutes of active work for every engineer-day the plan had estimated. If you count an engineer-day as 8 hours, that's roughly 1 minute of agent time for every 29 minutes of human time.

That number needs care. It only counts the agents writing code, not the time I spent reviewing and deciding. And the human side is what the plan estimated, not a team I actually timed.

The calendar showed something similar. One chunk the plan put at about 47 engineer-days was finished in about 2.4 calendar days. That includes nights, and the time it sat waiting for me to sign it off.

Where the time went

When I looked at where the hours went, it wasn't the coding. My approvals were usually quick. The time went to agents sitting on questions they didn't raise, like the one I found that afternoon. One plan also sat overnight waiting for my approval, and everything behind it waited too.

So I made two changes. An agent now has to ask for help after 15 minutes stuck. And if anyone wants to change what's in scope, it has to come to me as a written request, so I decide it once instead of finding out about it later.

None of this is new. Good delivery leads already ask teams to agree how the pieces will connect before anyone builds them, to start work as soon as what it depends on is ready, and to ask for help after 30 minutes stuck. In my experience those habits rarely last with people. Someone in a hurry changes how the pieces connect. Work waits for the next sprint anyway. People stay stuck for half a day because asking feels like admitting something.

Agents just follow the rule. When I told them to ask after 15 minutes, half the usual 30, they asked. The agreed connections between pieces are checked automatically, so nobody has to remember them. This is the first time I've seen these habits actually stick. I haven't measured how much they change the numbers yet, and I'll share that when I have.

Letting work run side by side

The other thing slowing us down was work waiting in line. I had been running the build in batches, and every piece waited for its whole batch to finish, even when the thing it needed was already done. In one chunk, most of the work could have run at the same time as the longest line of dependent steps.

So now a piece of work starts as soon as everything it depends on is merged. And before building starts, the way the pieces connect is written down and locked. Each piece is checked against that when it merges and again when the full tests run. Changing it needs a written request, and anything that relies on it waits until that's decided.

With the work split up like this, up to five pieces can be built at once, each in its own copy of the code. I expect it to shorten the longest line of work a fair bit, but that's still a guess until I've measured it.

I also changed how the setup decides an agent has stalled. If it can't tell whether an agent is working, it now assumes it might be, instead of treating it as idle. And what I learn on each real project now goes straight back into how the agents are set up.

What I'd do if you're adding agents

If you're adding AI agents to your engineering work, check how long they wait on you, not how fast they write code. The easiest fix I found was a simple rule: if an agent is stuck for 15 minutes, it has to ask you, and you answer the same day.

If you'd like to talk through where the waiting happens in your team, book a call.

Questions this note answers

How fast were the builder agents compared with the plan?

Across five chunks of work, the agents writing code spent about 16.5 minutes of active work for each engineer-day the plan estimated. Against an 8-hour day that's roughly 1 to 29. It only counts those agents, not my review or decision time, and the human side is the plan's estimate, not a team I timed.

What slows down a team of AI agents?

In my case it was mostly agents sitting on questions they never raised, and work waiting for me to decide something. The agents writing code were rarely what held things up.

What do contract first and dependency first mean?

Contract first means the way pieces of work connect is written down and locked before anyone builds, and checked automatically. Dependency first means a piece of work starts as soon as everything it relies on is merged, instead of waiting for a whole batch or sprint.

How long should an agent stay stuck before asking for help?

I set it at 15 minutes, half the 30 minutes many delivery leads ask of engineers. The agents follow it every time. People often don't.