Viral Shastri / Blog

I stopped being the message bus

What a year of AI agents changed in how I build.

November 2026 · 7 min read

In March I was the message bus. One agent wrote code in one chat. Another reviewed it in a second chat. I copied text between them all day, and I was the only memory they shared.

In November, one rules file governs every agent I run, in Claude and in Codex. Checks run on their own. A second model reviews what the first one built. My job is to approve the push.

Better models helped. Most of the change came from five shifts in how I work, between my first logged Codex prompt in November 2025 and now. Each one started with something that broke. I started in Codex CLI, moved to the Codex desktop app in August, and since October I run my agents in T3 Code, mostly Claude Code. The numbers below come from my commits and my agent session logs.

The year at a glance. Hover or tap a month; each tick is a turning point.

1. From me in the middle to scripts and worktrees

In March I built a client web app story by story with two sessions. A review session ran three sub-agents. A separate dev session fixed what they found. I pasted the dev's reply into the reviewer, and the findings back into the dev.

It worked. Tests went from 41 to 755 in 15 days, and the reviews found real bugs: a race between a delete and a sync that was just starting, and daily stats that a retry could count twice. But the loop moved only as fast as I could read and paste. One story at a time, and only while I sat at the desk.

The 14 test counts the dev agent reported, one per review round.

So I took myself out of every step I kept repeating. In April, shipping a story to the client meant the same steps each time. In one evening I put them into one shell script: the file list from the story's spec, the checks, lint, the merge request and a rollback. In May I gave each story its own git worktree, a separate checkout of the same repo, and four stories ran at once. In July one orchestrator thread took the place I used to hold. It handed each build, review and fix pass to a fresh sub-agent, with one commit per story.

Agents make the judgment calls. Scripts do the fixed steps. Each agent gets its own worktree.

2. From trusting the report to checking the result

This year I built two agent systems for my work on a large open-source app. The first grew to 279 commits from April to October. It finds issues in the project's tracker that we can take, alerts me on Telegram, and has agents (Claude Code or Codex CLI) draft proposals, each in its own git worktree. Later it moved to OpenClaw, with end-to-end agent tests.

The second, from July, is a pipeline that fixes unsafe TypeScript type casts in the same app, a few files per small PR. Agents edit the file, run lint, type checks and tests, and prepare a draft PR. I approve every push.

The pipeline's first version was a heavy Docker app. I replaced it with a small CLI and one skill. The agent that built the CLI reported 134 of 134 tests passing. Then an independent line-by-line audit found 28 problems: defects on the normal path, missing parts of the design, incomplete crash recovery, and tests that never touched the real production code. Every test was green. The tests were checking the wrong thing. A day later the same agent reported all 28 fixed. Its review list still had 13 fix items unchecked, so I rejected the claim and sent the work back.

That changed how I read every report. "Tests pass" from the builder is the builder grading its own work. Now the check comes from someone else. In October I gave models roles: Opus plans and writes the code, and a GPT model only reviews. When I compared two UX audits, the second agent was told not to read the first one. And before I accept a finish, I ask one plain question: "did you cover my asks 100%?"

"Done" is a claim. The agent that did the work does not get to check it.

3. From patching the system to deleting it

By September, the type-cast pipeline was stuck. Some runs had been going for days. Part of it was my own doing. I had added a way to override checks when I asked, and the runs started to lean on it and loop. On 3 September I counted about 10 runs. Only four or five had opened a PR at all. Several others were stuck.

So I stopped patching. That night I started over in a new repo. Every lesson from the old system stayed, and every stage became a ticket for a fresh agent session. On 4 September agents worked through the first ten tickets, with 44 commits on the main branch that day.

Then I read it, file by file. On 5 and 6 September the agent explained each file, and I typed one decision per file, in capitals. One of them removed the state machine that tracked each piece of work, and moved its identity and scope checks into one check at handoff. After file 40, I approved the scope. The rule for the build was one line: "we have to make sure that we delete more and add less".

From 5 to 9 September the main branch deleted 24,589 lines and added 16,284, lockfiles left out. Of the source files, 33 went and 9 new ones came in, and the TypeScript source shrank from 7,190 lines to 5,108. It was the second time I had thrown a version away. The first was the Docker app in July.

I did the same with my own process. In November I removed BMAD, the planning method I had used since my first prompt, from every repo that still had it.

When patches stop working, rebuild smaller. Count the lines you delete.

4. From endless loops to stopping rules

Agents do not stop on their own. In early July one story review ran for an hour and kept repeating itself. No rule said when to stop.

On 9 July I set one: at most three review cycles. Cycle 1 is a full review. Cycles 2 and 3 only check the fixes. After that, whatever is left goes into a deferred file, however critical it looks. Two weeks later I cut it further: one independent review, at most one repair, and no second review.

My review rule, four versions.

The same idea now covers more than reviews. My runs fail closed: they stop at the first thing that does not add up. The stops I hit in July were real bugs in my own tool, such as a 256 KiB cap on git output that a 366 KB test file broke, and an 8,192-character limit that a draft PR description ran over. Each fix went into the tool, not into the run. In October I told my agents to keep the number of sub-agents small. And in November the review rule became one rule for every agent: fix only the must-fix findings, check those fixes once, and stop after at most three rounds with a list of what is still broken.

Write the stop rule before the loop starts: how many rounds, and where the rest goes.

5. From rules in my head to rules in a repo, tested

Before November my global rules sat in two separate files, the same skills sat in several places, and some rules lived only in my head. A new project started with none of them. On 31 October I decided that every new project should start with all my rules already in place.

From 1 to 4 November I built one repo for that. It holds one global rules file that syncs to Claude and Codex, a wiki and one skill store. Git hooks check the rules, and a gate refuses to copy rules that fail those checks.

I also cut. My first memory design was too big, and I stopped it: "I don't want one of my agents to know everything about everything". Now agents save only what the code cannot show: my corrections, my decisions and why, and what failed. Every rule became one short line in plain English. The skill store went from 48 skills to 16.

Then I tested the rules like code, with an exam. It plants a change, starts fresh sessions, checks that they obey, and reverts. A one-line rule change reached every next session. A planted fake secret blocked the commit. A planted false wiki page did not fool them: both tools read the code and flagged the page as stale. On 6 November the wiki lookup scored 11 of 12 in Claude and 10 of 12 in Codex. The misses were on pages I had just changed. I fixed the pages and the questions, and both scored 12 of 12.

Agent rules are production config. Keep one copy, and test it with a fresh session.

What I would tell an engineer starting today

  1. Get out of the middle early. If you paste the same thing twice, write a script. If two agents run at once, give each its own worktree.
  2. Do not take "done" from the agent that did the work. Check it with a test that runs the real path, or with a reviewer on a different model.
  3. Write your rules down once, in one place, and test them with a fresh session. Put a stop rule in them before you start any loop.
The same change, March vs November.

I still approve every push. That rule has not changed since July. What changed is where I stand: at the end of the line, not in the middle of it.

Each week I write up one lesson from this year, with the numbers and what broke. Follow along on LinkedIn.