Skip to main content

Trust before parallelism

Opening more AI agents didn't make me faster. Trusting them did.

Updated 10 min readMarkdown
Part of seriesKarmi
Trust before parallelism

One PR at a time

Talk about AI coding agents often turns into a count. How many agents do you run at once? For karmi, the honest answer is one stream of work. From the first code on Sept 4th; to the end of the feature build on Sept 17th, at most one PR was open at any moment. Each one merged before the next one opened, one to five a day.

The count hides a plainer question. Would a second agent actually make me faster, or would it just give me twice as much output I did not yet trust? An agent whose work I had to check line by line, whose shortcuts I had to catch in review, and whose context I had to rebuild at the start of every session would not save me time. Two of them would make it worse. More junk PRs, more regressions to clean up, more of me in the middle.

Lauren Tan puts this as "trust before parallelism" in her talk, and that ordering is what I followed on karmi. I spent my effort on making one agent trustworthy enough to take a ticket from "ready" to "merged" while I was away from the keyboard. Parallelism is the next step that trust allows. I have not taken it here yet, and this article does not pretend otherwise.

Context could not live in my head

karmi is too big for one agent session. A session forgets everything when it ends, and the next one starts empty. If the context lives in a chat window, or in my memory, then I become the only connection between sessions. I would copy an error from one session into the next. I would explain the same design decision for the third time because the new session had never heard it. I would remember why a ticket was blocked, and the agent would not.

I never did that relay work on karmi. From the start, the issue tracker was the relay, and it was also the shared memory. If a decision mattered, it went on a ticket as a comment. If it was not written there, it did not count as decided.

That rule sounds like overhead on a hobby project with one person in it. It paid off because the other reader was always a new agent session that knew nothing. Any session could rebuild the context by reading issues. If a session died halfway through a piece of work, the next one read the same comments and carried on. My place was outside that loop. I chose the destination, answered hard questions, and made the calls that were mine to make.

A week of charting before code

The first week produced no product code at all. Charting ran from Aug 28th to Sept 3rd in GitHub Issues. Matt Pocock's wayfinder skill drove the planning. The idea behind it is older than AI agents. Get to a shared understanding before you write code, and write that understanding down where everyone can read it.

The chart was one "map" issue naming the destination and listing the decisions made so far. Each open question became a child ticket. Research, a grilling session, a spike, a prototype: 38 tickets in all, with 20 research notes and the first architecture decision records behind them. An agent took one ticket, resolved it, and wrote the result back as a comment.

By the time code started, those tickets held 68 comments. They fall into a few clear shapes.

  • Resolutions record what was decided and link the research note behind it. The scheduling ticket, for example, was grilled on Aug 30th. Its resolution decided that the scheduler is one internal module that shares the single alarm a Durable Object has. Then the map was updated.
  • Handoffs carry a decision to another open ticket it affects, as a comment that starts with a line such as "Input from". When the sub-agent design settled that a child conversation's approval request shows up on the parent, a comment on the approvals ticket said so, and said that the approvals ticket owns how it renders. There are 16 of these. Each one is a message I would otherwise have carried by hand.
  • Blockers are rarer. A few times an agent needed something only I could give, such as a credential with the right access. It did not guess. It wrote "Blocked on a human step", said what it needed, and stopped.
A loop on the issue tracker: a new agent session reads the map and its ticket, does the work, the guardrails check it, and the session writes a decision or handoff comment back to the ticket. The next session starts from that comment. The author sits outside the loop and does the charting, slicing and review.

The expensive thinking happened once, in the open, and every later session could reuse it. I never had to repeat a decision to make it real.

Tickets outside the repo, decisions inside it

The tickets never went into the repo. Only the decisions that outlived them did, as architecture decision records (ADRs) in docs/adr.

A ticket is working state: an open question, a debate, a handoff, a blocker. Once it closes, it is history, and some of it is no longer true. Agents treat whatever sits in the codebase as the pattern to follow. Put old tickets there, and an agent will read a superseded idea as current truth.

An ADR records a decision that lasts, and why it was made, next to the code it shapes. It is versioned and reviewed with that code. When the decision changes, a new ADR replaces it; nobody edits the old one away. ADR 0004, for example, explains why a Fork copies its media: deleting the original Thread used to turn a Fork's images and files into placeholders.

Tickets an agent could finish without me

On Sept 4th I sliced the spec into 29 tickets marked ready for an agent. Each ticket had the same shape: what to build, acceptance criteria as a checklist, and the tickets it was blocked by. The first one was a tracer bullet, a single text Turn of a conversation run end to end before any tool, provider or HTTP work. It merged the same day.

A ticket like that is a contract. The agent did not need to ask me what "done" meant, because the ticket said it. It did not need to ask what came before, because the blocking tickets were closed and their decisions were sitting in comments. I could read a ticket, decide it was clear, and walk away.

Guardrails that corrected the agent before I did

Clear tickets were not enough. An agent that knows what to build can still build it badly. It can reach for a shortcut, copy a pattern I wanted gone, or throw an error nobody can handle. If I had to catch all of that in review, I would be back in the middle again, this time as a relay for my own standards.

So I put the standards where the agent would meet them without me. On Sept 11th one PR added a formatter, lint guardrails, typed error codes and a set of TypeScript guidelines for agents. It fixed every existing violation in the same change. Here is part of the lint config, from the public repo:

// Lint guardrails shared by every package. A new rule that meets
// existing violations grandfathers them with `eslint --suppress-rule`; fix them, never add to them.

/** Rejects direct use of a Durable Object's raw SQL execution escape hatch. */
export const rawSqlExecSyntax = {
  selector:
    "CallExpression[callee.type='MemberExpression'][callee.property.name='exec'][callee.object.type='MemberExpression'][callee.object.property.name='sql']",
  message: "Use the owning db module instead of calling storage.sql.exec directly.",
};

The useful part is the message. It tells the agent where the right path is. When an agent wrote raw SQL, the lint run failed, the agent read the message and moved the query into the db module. I was not in that exchange at all. The correction happened between the agent and the codebase, and it happened the same way every time.

The typed error codes did the same for failures. An error that karmi gives to a caller is a KarmiError with a stable, dotted code such as thread.busy or scope.destroyed. A new failure adds its code to one list first, and the type checker rejects a code that is not on the list. An agent could not make up a new code on the spot, and a caller can switch on the code instead of parsing a message.

Four feature PRs merged the same day as the guardrails: offline delivery of replies and approvals, the AI SDK provider adapter, Compaction and Fork, and Skills with deferred tool loading. Most of the v0 tickets closed over the following week, and the last one closed on Sept 19th.

Lint is only one way to correct an agent. Rules, review and verification each do a share of the work, and a later article goes through all of them.

What it gave me

One person shipped the whole v0 ticket set without losing control of the quality. Over the life of the project that came to about 120 PRs. Nearly every commit was co-written with an AI coding agent. Most of the implementation happened while I did something else.

It also changed what my time went to. I did not spend it re-explaining decisions, copying output between sessions, or chasing style in review. I spent it on the work that was mine: charting the design, answering hard questions in grilling sessions, slicing the spec, and reviewing the result. I could get out of the agent's way because the context and the standards were written down where it could reach them.

What it cost, and what is missing

One PR at a time is slow in wall-clock terms. Some tickets on karmi had no dependency on each other and could have run side by side. They did not.

Writing everything down costs effort too. A comment for every decision only pays off if it gets read again. On karmi it was, by every session that started empty.

And I have not proven the parallel step here. I believe the same tracker, tickets and guardrails would carry several agents at once, because none of them depend on me being in the middle. But belief is not evidence, and I will only claim it once I have run it.

Start with one agent you can trust

If you want more output from coding agents, look first at where you sit in the loop. If every session needs you to restate the context, a second agent doubles that load. The same goes for every shortcut you catch in review.

On karmi I took myself out of the middle first. The context went on tickets, the tickets said what "done" meant, and the codebase corrected the agent before I had to. Only after one agent could finish without me would a second one be a small step.


Code: github.com/dsblabs/karmi-oss

Previous: Why I built a serverless agent harness. Next: The five correction layers

If you work with coding agents, I'd like to know where you are still the relay. Tell me in the comments.

the lint message that points the agent at the right path is the best idea in here, the codebase corrects the agent and you’re not in that exchange at all. the place most people are still the relay is the failure side, timeouts, retries, errors that get swallowed, since lint rules rarely cover those. that’s where the tomosu MCP server sits, the agent pulls reliability findings mid-task with the before and after fix already written, same idea as your lint messages