The 03:00 test: how a new team starts with agents and bay
Gudjon Gudjonsson · Founder and CEO of OZ · 4 December 2026
It is 03:00 on a Sunday, and an agent finishes a change. With pull requests, the change waits until a person reads it on Monday. With bay, checks run on the change merged onto the latest main, and it can merge five minutes later. This post is for a new team that wants to work that way. It shows where to start, what changes for the people, and where the trust comes from.
Two earlier posts give the why. An hour, a day, a week shows how one team runs its agents around the clock. No pull requests shows what bay does in place of a review before each merge. This post is the how for a team that starts today, in nine steps.
What changes for the team
Three things change at once. Agents write the code, and checks judge it. Work merges at any hour, because no step waits for a person. People stop reading the code, and serve the agents that write it.
| Before | With agents and bay | |
|---|---|---|
| Who writes the code | People | Agents |
| Who judges a change | A reviewer | The checks that people agree on |
| When work merges | When a reviewer is free | When its checks pass, at any hour |
| How the work splits | Teams and tickets | Work streams, each with a home file |
| Where the plan lives | A tracker and slides | Files in the same tree as the code |
| What people read | Diffs | The plan, the standard and the evidence |
| What people do | Write and review code | Give agents direction, context, a standard and tools |
| What a mistake gives | Blame and more process | A fix in a file, and a new check |
Step 1: assess how your team keeps its knowledge
Start with an assessment, not with a tool. An agent at 03:00 has no person to ask. It knows only what it can find in its checkout with ls, grep and cat. So list each kind of knowledge that your team uses, and where it lives today. Then ask four questions about each kind.
- Can an agent read it? It sits in the repository, as plain text, beside the code.
- Is it current? A file says what is true now, and Git keeps what was true before.
- Can an agent check it? It says what done means, as a test that can fail.
- Does it have one home? One fact lives in one file, and other files link to it.
Each no in the assessment is a card for your first backlog. Move the knowledge before you add agents. An agent that cannot find a rule guesses, and the guess merges when no check stops it.
Step 2: map your value streams, and give each work stream a home
Next, assess your value streams. A value stream is one thing that the product does for a customer, such as pay for an order. It lasts for years. A work stream is the part of the work that one group drives now, for one phase. An agent that does not know its edges changes files that another stream owns. So give each work stream a home file, and let it say four things.
- Owns: the value streams, folders and decisions that the stream drives.
- Does not own: the parts close by that belong to another stream.
- Person: one person who clears the way and makes the calls that nobody can undo.
- Contracts: what the stream gives to other streams and takes from them, such as an event.
Streams do not wait on streams. When a stream needs an input that is not ready, it builds a stand-in and merges its work now. A swap test says when the real input takes over from the stand-in. A card that says it waits on another stream is a sign to look again. One stream serves all the others: the harness, the checks and the machines that the agents run on.
Step 3: put the plan in the same tree as the code
The plan is the work that waits: cards, the roadmap, the rules and the decisions. Put it in the repository as plain files, beside the code. Then the code says what is, Git says what was, and the plan says what will be. An agent reads all three in one checkout, at one commit. A change to the plan and a change to the code merge together, through the same checks.
One team that works this way read its own main for the 30 days to 4 December 2026. It held 9,835 commits from 187 named agents, and all but one merged through bay. 78 % of them changed the plan, and 44 % changed only the plan. So the plan is not paperwork beside the code: it is most of the work.
One team's numbers, read from its own main on 4 December 2026. Measure your own.
Step 4: write cards that an agent can act on
A card is one Markdown file for one piece of work. Its front matter says what done means, so an agent needs no person to ask. Give each card five fields.
- Outcome: what is true when the card closes.
- Non-goals: what the agent leaves alone.
- Done when: a test or a check that can fail.
- Context files: where to start in the code.
- Depends on: the cards that must close first.
A script, not a person, says when a card is ready for an agent. A ready card has no open questions, and a done-when that the script can read. Before the night, queue a few ready cards for each agent, so that no agent waits for work.
To close a card, the agent adds a short ## Learning note to it. Then it deletes the file in the same change as the code, and Git keeps the note. So the board is the list of files that remain, and nobody writes a status by hand. bay writes the intent and the actor of each change into its merge commit, as Git trailers. Start each intent with the card's id, and git log --grep=web-42 finds every merge for that card.
Step 5: give each agent a name and a seat
An agent session ends when its context fills up, but the work goes on. So give each agent a seat: a fixed name, one kind of work and one machine. The seat keeps a record file, and each new session in the seat reads it first. Set BAY_ACTOR to the seat's name, and bay writes that name on each merge.
One team runs its seats in Herdr, a terminal app that runs many coding agents side by side. Each machine runs one Herdr server, and each seat is one session in it. A seat has one name for its session, its messages and BAY_ACTOR. bay status --all then shows what each seat works on, by that name. That team's roster lists 83 seats on six machines, and most of them take one card at a time. A few seats do other jobs: a steward keeps one machine healthy, and one seat watches the merges.
Step 6: people serve the agents
In this setup, people do not write the code. They serve the agents that write it. An agent at 03:00 needs five things, and people make sure that it has each one.
- Direction: one file that says what matters most now.
- Context: the plan, the rules and an
AGENTS.mdthat each agent reads first. - A standard: tests and simulations that say what good means.
- Answers: a person who decides what only a person can decide.
- Tools: the harness, the checks and the machines that the agents run on.
Set BAY_REQUESTER to the person an agent works for, and its merge names that person. So each change has a person who answers for it, but no person in its path.
Step 7: earn trust, layer by layer
Code that an agent writes is disposable. Another agent can rewrite it in the next hour, so a read of one version tells you little. Trust comes from the parts that stay when the code changes. People write and read those parts: the plan, the standard, the evidence and the rules. Agents read the code.
Each layer has a rule that a person can read and test.
- The standard: people write and agree on the tests that say what good means.
- The checks: each check before the merge runs on the change merged onto the latest main.
- The merge: bay checks each candidate and merges that same commit.
- The evidence: the record of every check stays in Git, beside the code.
- The undo:
bay undotakes one merge back out of main, as a new checked change.
With the agent hook on, bay refuses an agent's own git push of main. On a forge, let only the runner's identity push to main, and no agent goes around the checks.
Trust grows when the checks catch what they must catch. Earn it in four ways.
- See each check fail first. A check that never failed can pass on anything.
- Count no data as a fail. A check with nothing to read fails, and does not pass.
- Never weaken a test to pass. Fix the code, or change the standard in its own change.
- Add agents step by step. Start with one agent, and add more when its merges stay green.
Trust also needs a clear limit on what an agent decides alone. Sort each act by how easy it is to undo. An agent decides an act that is easy to undo, records why, and goes on. For an act that is hard to undo, it decides only when it is sure. An act that nobody can undo waits for a person, and the agent takes the next card. So the loop never stops, and a person reads each decision in the morning.
Step 8: expect mistakes, and learn from each one
Agents make mistakes, and so do people. That is fine, because each mistake shows a gap that you can close. When a mistake merges, ask what the system did not have, not who made it. The cause is nearly always a missing fact, a weak check or a missing alarm. Find what the agent read, and fix that file. The next agent then reads the fix, and so does each agent after it.
Close each mistake with a check, not only a lesson. A lesson in a note helps the next agent only when it reads the note. A check stops the same mistake every time, at any hour. So a review of what went wrong ends when its new check is on main.
Write down the near misses too. Keep a folder of things that almost went wrong, such as a mistake that only luck caught. Delete each file when its fix merges. Give each recurring job a row that says when it last ran and what it made. Raise an alarm when a row is too old, and count a run only when it made something. Let only one writer change each shared file, so that two agents never overwrite each other.
Step 9: pass the 03:00 test
Take the steps in order, and let each one work before you start the next.
- Assess: list your knowledge and your value streams, and where each one lives.
- Move in: put the plan, the rules and the stream homes in the repository, with
AGENTS.mdfirst. - Set the standard: turn your tests into checks, then install bay.
- Run one loop: one agent takes one card at a time, until it closes cards with no help.
- Run around the clock: name the seats, start runners as services, and read
bay status --since --mergedeach morning.
A small team can start with no runner at all, as Run bay without a runner shows. The test is this: at 03:00 on a Sunday, changes merge, and nobody wakes up.
What is still hard
The team above still has gaps, and a new team can expect the same ones.
- Old files pile up. Delete a file when its work ends, because Git keeps it.
- Work hides in commit messages. About a third of that team's commits name open work that no card holds.
- Free text creeps in. Over 40 % of its card trailers hold free text, not a card id.
- Order stays unwritten. Only 37 of its 435 open cards say what they depend on.
- Usage limits stop seats. Watch the quota of each account, and move a seat before it hits the limit.
- Some knowledge stays outside. Chat, meeting notes and private notes hold facts that no agent reads.
Start today
bay is free under the MIT licence, with no account and no paid tier. It runs on your machines, and your code goes only to your own Git remote. Install bay, then follow the quickstart. To build bay with us, email the founders at hello@getbay.io.
Gudjon Gudjonsson · Founder and CEO of OZ