An hour, a day, a week: how one team runs its agents around the clock
Gudjon Gudjonsson · Founder and CEO of OZ · 26 November 2026
After a talk about bay, an engineer asked us a good question. How does a team get hour-long sprints, at the scale of a fleet that runs day and night? Our posts set no cadence. Our post on hooks says a two-week sprint can shrink to an hour, but it does not say how. This post is the how, from one team that runs its coding agents around the clock. The rhythm is half of it, and the trust, files and loops under it are the other half.
The rhythm in short
The rhythm has five layers, and bay holds them together at main.
- A dossier plans one whole capability, the size of a project that would take a human team many sprints.
- A phase of the dossier is one long run of hours or days, until its gate passes.
- A cycle takes up to about an hour: plan, build, check and learn, in that order.
- A day is the people's cadence: guide, review, align and refine while the runs go on.
- A week plans a batch of dossiers, sets outcomes on Monday and scores them in a demo on Friday.
- bay merges every loop's changes into one main, with no pull requests.
A dossier plans a whole capability
Each capability gets one planning dossier: a folder of Markdown in the repository. Agents read it, write it and run it. In human terms, a dossier is a project that would need many sprints. A dossier holds these parts:
- The problem, and each part of it as one testable sentence.
- Done-when for each part: a command, a measure or a file that shows the part works.
- Research and decisions: findings that cite the code or a source, and each open question decided once.
- What gets built and what gets deleted: a plan with only additions is not finished.
- Phases and waves: steps in the order their dependencies need, each with a gate it must pass.
- A closure: the verdict, a retro, and a list of improvements for the next planning work.
The status comes from the done-when boxes, never from a hand-typed field. A dossier is single-use: write it, run it, close it. Before it closes, every lasting fact moves to a lasting home: the code, a rule, a skill or a check. After that, the dossier is a record of what the team did then. It never describes the system now.
A dossier can be much more than a sprint backlog. How much it holds depends on its scope, and on how well the team structures the repository. Agents work with the most confidence when the repository gives clear context on everything they touch. So the clearer the repository, the larger the scope one dossier can hold.
Mistakes are cheap in a dossier. A wrong boundary costs an edit there, and a regression in the code. So the team does the design in the dossier, and the code follows it.
A long run goes until it can close
A dossier runs in phases, and each phase ends at a gate of its own. A phase is one long run, and it can take hours or days. Day and night make no difference: a run starts as soon as the plan is ready. It runs until the evidence is strong enough to close, not until a set time. A large dossier can carry several phases and dozens of waves. A dossier that keeps adding phases with no closing condition has lost its scope.
An hour holds a whole cycle
One agent runs a phase of the dossier in a loop. In Claude Code, the team runs /loop with no interval, and a prompt that points at the dossier's harness file. After each cycle, the agent picks when it wakes next, from one minute to one hour. Each cycle reads the harness file again, so an edit to it reaches the next cycle. The memory lives in those files, not in the chat, so a fresh session can take over. Each cycle follows the same five steps:
- Read where the last cycle stopped.
- Take the next wave step that nothing blocks.
- Build it.
- Run the wave's gate.
- Write a short status and the lesson for the next cycle.
In scrum terms, each cycle has all of a sprint's steps: planning, the work, a review and a retro. That gives about 24 cycles a day for each dossier. A phase often runs for about three days of cycles. A cycle that finds nothing new should stop, not invent work. Each step ends in bay merge --wait, which waits and tells the loop if the change merged, and if not, why. A loop prompt can be this short:
Read the dossier's harness file and the last status first.
Take the next wave step that nothing blocks.
Open a change for it: bay start "<the step>" --paths <its paths>
Build it, and run the wave's gate.
Merge it with bay merge --wait, and act on the result.
Write the status and one lesson for the next cycle.
If no step is left, say so and end the loop.Prepare the long run
Before a long run, the team writes a harness file for the loop. The file is the prompt for the whole run. A vague file gives a run that drifts. A harness file holds these parts:
- The goal, in one sentence.
- Where it runs: the machine, the commands, the branch and the logs.
- The entry gate: what must be true before the run starts.
- The queue: the next three to seven steps that nothing blocks, in order.
- Stop rules: when the run must halt, and what it leaves for a person.
- The report: what got done, what failed and what waits, written for the next cycle's agent first.
It also says which decisions the agent makes alone, and which wait for a person. The default is that the work goes on. A run should not stop because the next step touches real code. A runner finishes each merge after the agent's session ends, so merges go on at any hour. After the closure, the team reads how the run went, and improves the next harness file.
The agent decides what it can undo
When the priority is unclear, the agent reads the priority file, then the dossier's plan, then its notes. Only then does it ask a person. It decides what it can undo, and logs each decision. It flags the decisions it doubts in its report. What it cannot undo waits for a person. It never asks a question that already has an answer.
This is where bay helps. bay undo takes one merged change back out of main with a new checked change. So a merge is a decision the agent can undo, and the agent can decide more on its own. With [red] undo_after_s, a runner also undoes a change that turned main red when no fix comes in time. Mistakes become cheap, and the fleet learns from them.
A day is the people's cadence
A day is the cadence of the people who guide the work. Research units, planning dossiers and long harness runs go on meanwhile, some of them for days. A day for the people looks like this:
- Morning: set the day's priority, and answer what waits for you.
- Day: review the work, align the team, and refine the plans for the next runs.
- Always: agents do the rest, and their loops keep running.
- Evening: before you leave, make sure every agent has a long run going, so the night is busy.
The people do not read the runs each morning: the agents do, as part of the run. Each cycle starts with bay status --since and the cursor the last cycle saved. So the agent sees what merged meanwhile, and a person reads only what waits for them. One developer can guide as many long runs and dossiers as they can handle. That number grows with experience, and with how well the work fits the long-term roadmap and vision.
Value streams, not an org chart
The team does not copy a human org chart onto its agents. Agents work differently from people, so human roles such as tester or team lead fit them badly. Instead, the work follows value streams, as kanban sets them up. Each stream carries one flow of value, from an idea to a merge in main.
Each agent has a stable seat: the same role, the same files and the same name, day after day. The seats have clear roles:
- Stream agents each carry one value stream, and keep its dossiers moving.
- Fleet operations keeps the machines, the runners and the loops healthy.
- Stewards each look after a shared area, such as the docs, the rules or a product.
- Project agents start for one dossier, and stop when it closes.
Fleet operations rolls bay out to every machine, and turns on its hooks for all of them with one merge.
A week: plan, then demo
A week is a unit people have lived by since kindergarten. Everyone knows how much fits in one, so a week is easy to plan and to measure. The rhythm borrows the cadences people already live by: the hour, the day and the week. The agents' work scales inside them, and the people keep a pace they know.
Each value stream has a weekly outcome, and one person guides the whole stream, not a single project. In a weekly planning meeting, the team reviews every research unit, planning dossier and closure from the week. It moves the ready ones into execution, so each week starts with a large batch of ready work. On Monday, each stream sets its outcomes for the week. On Friday, a demo scores them, with results anyone can run again, and a retro follows. The demo can run from staging, where a promotion rule names the checks a main commit must pass first.
The priority lives in one file that every agent reads. When the priority changes mid-week, the file changes, not a chat message.
Stand-ups become integration meetings
The daily stand-up changes into an integration meeting for the people. Status is already in the board and in Git, so nobody asks what you did yesterday. The board reads each dossier's done-when boxes, and bay status --all shows who works on what. So the people meet to fit their streams together: the seams between parts, the shared words and the decisions.
What the rhythm stands on
The rhythm is the easy part to copy. It works because of what sits under it, and most of that is culture, not tools.
Trust first, then measure
The old saying fits well: it is easier to ask for forgiveness than for permission. The team applies it to how people and agents work together. An agent acts first, and a person corrects it later, if that is necessary. That takes trust, and the trust comes from measures, not from hope. The harness measures each agent: its gates, its stop rules, its decision log and its report. As an agent does well on those measures, the people who guide it give it more room.
People guide, and agents do the work
On this team, people guide the work and agents do it. A person sets the direction, names the outcomes and removes what blocks the agents. No person stands in the path of a change as a gate: no pull request review and no sign-off. bay can hold chosen paths for a person's approval, but this team uses none. The checks are the gate, and when a check is wrong, a person changes the check. This is a change of culture more than of tools, and it is the hardest part.
Nobody reads the code
Nobody on the team reads the source code as part of the work. Agents read it, and the checks judge it. The code is disposable, and the next hour can rewrite any part of it. What people read and agree on is the gold standard that the code must meet.
Software took this step before. Most Python developers never read the C source of the interpreter that runs their code. Most C developers never read the assembly their compiler makes from it. Each layer earns trust from its tests and its record, not from a person reading it. Code an agent writes is one more layer: people read the standard above it, and checks judge it.
So the work is test-driven and simulation-driven, in closed loops. The team writes the standard first: tests, well-made simulations and a design system. Each becomes a check that bay runs on the changes it covers, before they merge. Each loop builds against that standard until every check passes, then merges. A clear standard lets a loop close with no person in it. A vague one makes the loop drift, however good the agent is.
Every silo moves into the repository
No work lives in a tool outside the repository. Trackers such as Jira, Linear, Asana, and GitHub Projects and Issues each hold a silo. So do SharePoint, Google Docs, Word and Excel, and agents read all of them badly. So the team moved all of it into Markdown files with YAML front matter, or other files agents read. The front matter holds the fields, such as the type, the stage and the links. The body holds the text that a person or an agent reads.
---
type: customer
stage: trial
stream: sales
links: [decisions/trial-pricing.md, dossiers/onboarding.md]
---
# Example Ltd
They want a two-week trial for their data team.Many MCP servers burn tokens too, so the team stays away from most of them. An agent can code against an API, or run a CLI, for far fewer tokens. Each hop outside the monorepo costs tokens, so agents skip such hops most of the time. The same goes for outside memory systems, such as graph databases and vector databases. So everything lives as code and plain text, in the monorepo.
The repository holds the governance
The governance lives in the same monorepo as the code. The priorities, rules, decisions, research and board are all files there. A change to a rule is a change like any other, and it merges in the same way. So an agent finds every rule it must follow in one place, at one version. bay's rules live there too: .bay/policy.toml on main names the checks a change must pass.
The first reader of the repository is an agent, not a developer. So AGENTS.md comes before README.md. It tells an agent where things are, which rules apply and how to check its work. README.md is for the people who visit. Beside it, the bay skill tells any coding agent how to merge with bay.
Files and a shell are the agent's tools
Coding agents know code best, so the team gives them all data in the shape of code. Each thing an agent needs is a file, in folders that follow the domain. The agent finds its context with shell tools it already knows: ls, find, grep and cat. It reads only what it needs, and it finds exact values, not near matches. The team needs few custom search tools, and no copy of the data to keep in step. bay is one more shell tool: its result is JSON, and each refusal names the next step.
The files make a knowledge graph
The team shapes its files like the Open Knowledge Format. Each file is one concept: plain Markdown with YAML front matter. The front matter gives the concept its type, its sources and how long it stays current. Its links to other files are the edges between concepts. An index file in each folder lets an agent read one level at a time.
So the files form a property graph: typed nodes with fields, and links between them. A small index over the front matter and the links can answer graph questions. For example, it can say what links to a decision, or which facts are past their date. The files stay the source, and Git keeps every version. bay keeps its own records the same way: changes, evidence and talks live in Git, with no server.
Domain agents, not only skills
The team believes in strong domain-specific agents, more than in skills alone. A skill teaches a general agent how to do one task. A domain agent owns a domain: its files, its rules, its memory and its seat. It knows the domain's history, words and traps, and it makes them better over time. Skills still help, and a domain agent uses many of them. But a skill alone owns no outcome.
A good domain agent is a thin seat that is easy to add, watch and remove:
- One slice: it owns one part of one stream's work, and new work gets a new agent, not more tools.
- Least privilege: it holds only the tools and data its slice needs, enforced by the harness, not the prompt.
- A thin agent: code does the routing, checks and evidence, and the model judges only what code cannot.
- Its own eval: a private test of its exact job admits and promotes it, not a public benchmark.
- Loose coupling: it never reaches into another agent's state, and asks through a talk, a card or a queue.
- No model as foreman: code and the plans hand out the work, and bay's queue orders the merges.
Agents talk to each other
Domain agents must ask each other for things, across machines, accounts and products. bay talk lets one agent ask another for one change, decision or check. A talk is a record in Git, not a chat, and it travels through the remote the team already shares. The recipient's bay acks it at its next fetch, and the recipient owes a reply by a follow-up time. So an agent asks the owner of a domain, not a person, when the answer lives there. Any agent the project enrols can send and answer a talk from a shell.
# needs [talk] enabled = true in .bay/policy.toml on main
bay talk research-agent "Which card providers retry a failed payment on their own?"Across products means a talk can pass between agents from different vendors. For example, a Claude Code seat sends the talk above to the research agent, which runs Grok. Grok answers, and sends its own talk to a Codex seat to judge the findings. Codex replies with a score, and the Claude Code seat plans its next step from both answers. No product needs to know the others: each enrolled agent runs bay talk in a shell.
The right agent for each job
Since bay talk works across products, each seat can run the agent that fits its job best, from any vendor. Claude Code, on the newest Opus model, runs the long harness work, for hours or days at a time. Grok deepens research, because it can search the posts on X. Codex does judge work: it scores another agent's output against the standard. Other agents take other jobs, and a seat changes its agent when a better one comes.
A judge works like any reviewer wired to bay: its score feeds the next plan, and never decides a merge. Whichever product a seat runs, bay's hooks in Claude Code and Codex refuse an agent's own push to main.
From research to a merge, in one loop
Research, planning and building all happen in the same monorepo, in one closed loop. A research unit answers a question, and writes down what it found, with its sources. A planning dossier turns those findings into a plan, with a done-when for each part. Its execution phases run that plan in loops, and merge each step. The coding agents build in each person's favourite terminal multiplexer, such as tmux or Zellij. Their machines can sit anywhere on the network, even around the world, all on one monorepo.
A research spike can run in a sandbox lane: bay checks it against main and never merges it. Where machines share a network far from the hosted remote, an origin keeps bay's round trips local.
The closure ends the loop, and it is a closed loop of its own. It checks the result against the plan, and the plan against the research it stood on. Because the research was strong, the closure can say which assumption was wrong. The agent that ran the work writes most of the retro. It knows best what went wrong, what to improve and what it still needs.
Each closure gives a list of improvements, and the next planning work uses that list. So each plan starts with what the plans before it taught. For this team, that loop is the winning process: nothing gets lost between tools or teams.
Lessons go into the system
Every recurring process is a closed loop: a trigger, a record, a reading and a change. A run can go on for days and teach nothing, if no loop closes. So each lesson becomes a check, a rule or a field, not a paragraph. A lesson left as prose is lost by the next dossier.
The rules file that every agent reads is the most lasting file in the repository. Each edit to it changes how every later session works. So the team treats an edit there as a change of doctrine, and prunes old rules.
Each day, the fleet learns from its work
Once a day, a routine called Learn from work reads what the fleet did since its last run. It reads the sessions, the refusals, the talks and the closures, and looks for repeated problems. Then it proposes improvements to the rules, the skills and the harness files. Those improvements go into the next day's queue, like any other work. So the fleet's own loop closes each day, as a cycle closes each hour.
How the team knows it works
Five tests tell the team if the rhythm holds:
- Every run: each long run goes on until it can close, or names why it stopped.
- Around the clock: every stream merges work, and no agent sits idle at night.
- No repeat questions: agents never ask a question that already has an answer.
- No collisions: agents that run at once never break each other's work.
- Every week: each stream sets its outcomes on Monday, and the Friday demo scores them.
These are tests, not promises. When one fails, that is the next thing to fix.
Where bay fits
Every loop ends in a merge, so main gets changes at all hours. bay's job is to keep those merges moving as fast as the checks allow. Then source control is not what holds the team back. The limit becomes the people: how fast and how deep they can guide the work.
Pull requests would make each loop wait for a person. Instead, bay checks each change together with the others in line, and merges only what passed. If main still turns red, bay names the change that caused it, or the few merges that could have. Each agent opens its own change in its own view with bay start. Our post on pull requests answers the common questions.
Start with the backlog and the roadmap
If you want to try this rhythm, start with what the agents will read:
- Move the backlog and the roadmap into Markdown files in the repository first.
- Make the backlog clear: each item gets its problem, its done-when and its place in the roadmap.
- Write
AGENTS.md, so an agent knows where things are and how to check its work. - Write each done-when as a command, a test or a simulation before any loop starts.
- Then start one dossier and one loop, and add more once its runs close well.
- Install bay, and let it merge what the loop builds.
The rhythm needs only files in the repository, a coding agent and bay. Change it to fit your team. A small team can even start with no runner, merging from its own machines.
curl -fsSL https://getbay.io/install.sh | shGudjon Gudjonsson · Founder and CEO of OZ