mainGit remote24 agents · 4 machines · 1 main branch on Gitlaptop-1build-boxgpu-boxci-runnerbay
Free · open source · MIT · sponsored by OZ ↗

For teams that run many coding agents

Many agents. Git. No merge mess.

Your agents finish in minutes. Why do they wait hours to merge? Git is fine, but the workflow around it was built for people. Several agents in one codebase, often in the same files, get stale branches, colliding merges and a broken main. With bay, an agent submits once and moves on, and bay merges what your policy clears on the latest main. Free, open source, and your code stays on your machines.

$ bay start "fix the login page" --paths src/api# open a view with only the paths this change needs
$ bay merge# submit and return while a runner checks and merges it
$ bay merge c7k2m4qa --wait=3600# wait in the background, and hear when it merges
$ bay status# what each change does now, why it waits, and an estimate of when it merges
$ bay undo c7k2m4qa# a new change that undoes one merge

Rust · one binary · macOS · Linux · ARM and Intel · Windows from source · MIT · free

Sound familiar?

Is your Git workflow now the limit of your agent fleet?

Do your agents' branches go stale before they merge?

→

Agents create no branches: a change is bay's own record, edited in a view. bay combines it with the latest main, then checks it. If main moves first, bay checks again before it merges.

Do two changes that each passed break main together?

→

bay checks the exact result of the merge, not the branch alone. The commit on main is the commit that passed, unless you turn on batching or footprint reuse.

Does an agent learn too late that code it depends on changed?

→

When an input of its change merges, bay tells the agent what changed. The change cannot merge until it checks again.

Does an agent quietly put back code that another change merged a moment ago?

→

bay refuses a change that would undo work merged after it started, and names that work. Reworking those lines still merges.

Do two agents edit the same design file, and one loses its work?

→

Name the files that never merge, and the first edit takes the file's lock. On a file marked lockable, bay's hook refuses another agent's edit at once. A change without its lock does not merge.

Do your agents finish in minutes, then wait hours to merge?

→

bay merge returns at once. A runner checks, merges or asks for one exact repair, so no person watches. Runners can batch changes and check the next ones early, so more changes merge each hour.

Does a slow test suite hold up every merge?

→

Mark slow whole-tree checks stage = "post", and they run on main after the merge. If one fails, bay names the merges that could have caused it. With [runner] bisect_post, a runner finds the one merge. A change on the red paths runs that check before it merges.

Do flaky or silent checks still get through as green?

→

A check that crashes, times out or finds fewer tests than its minimum blocks the merge. A check that passed once and failed once on the same tree is flaky, never green. A waiver is a named gap, never a pass. A person waives only a check you mark waivable, or a check on a repair of the policy itself.

Do your agents retry in loops after a refusal?

→

Each refusal names a fixed reason, what the agent can do, and when to retry. bay refuses an unchanged retry at once, without doing the work again.

What you can count on

Do not take our word for it. Everything below has a failure test that must pass before each release, signed in Git notes. Verify any release yourself: fetch refs/notes/bay/*, then run scripts/gate.sh --verify <commit>.

01

What bay merges is what it checked.

bay first builds a candidate from the change and the latest main, then checks that exact candidate. A change no pre-merge check covers waits for no check. bay merges the candidate only if main did not move. If main moved, bay builds a new candidate and checks again. bay's commit on main is the commit that passed, unless you turn on batching: then a batch's last commit passed. A check with footprint = true or footprint = "observed" may also cover a later tree that reads the same files.

candidate → main
c7k2m4qa.1.1 on a1b2c3d pass
MAIN_MOVED a1b2c3d → e4f5a6b
c7k2m4qa.1.2 on e4f5a6b pass
merged 9d1e07c
02

Submit once. Walk away.

bay merge returns at once. While a runner runs, it does the rest: bay runner run, or your CI through the same contract. It checks, merges, recovers, or asks for one exact repair. If a reply gets lost, bay finds the first result and does not merge twice.

$ bay merge
{ "decision": "queued",
  "state": "submitted",
  "waiting_for": "runner" }
03

Unknown is never a pass.

A check that crashes, times out or finds fewer tests than its minimum blocks the merge. A waiver is a named gap, never a pass. A person waives only a check you mark waivable, or a check on a repair of the policy itself. Finished checks keep their results. A resume runs only the missing checks.

checks · candidate h2w6tzq4.1.1
unitpass
lintpass
buildpass
docspass
migrationspass
integrationunknown · timed out
CHECK_UNKNOWN · blocked
04

Stale work stops. Repair stays open.

When an input of your change merges, bay tells the agent what changed. The agent can still edit. It cannot merge until it checks again. This covers the inputs the change declared, and bay states how much it could see.

$ bay status --since
merged 4e7a1c0 · change c5p3xdk2
INPUT_CHANGED · contract:api.orders.schema
observed v17 · required v18
05

Every refusal says what to do next.

Each refusal has a fixed reason code. It also lists what the agent can still do, and when a retry can work. bay refuses an unchanged retry at once, so no agent loops.

{ "schema": "bay.result/1",
  "decision": "blocked",
  "reason": "MERGE_CONFLICT",
  "detail": { "conflicts": ["src/orders/client.rs"] },
  "allowed": ["read", "refresh", "repair"],
  "retry_when": "after_fix" }
06

Git is the only store.

Changes, evidence and events are Git commits, notes and refs. There is no database and no server. You can read and recover everything with plain Git, on the host you have.

$ git for-each-ref refs/bay refs/notes/bay --format='%(refname)'
refs/bay/changes/c7k2m4qa
refs/bay/requests/c7k2m4qa
refs/bay/landed/c7k2m4qa
refs/bay/registry
refs/notes/bay/evidence/ci-linux
07

A view costs what the task reads.

bay start opens only the paths that one change needs. All views of one clone share its Git objects. bay never reads a missing path as a deletion. This holds on a warm cache. Build outputs, fixtures and wide searches can still cost more.

$ bay start "fix the login page"
view sparse · declared paths only
objects shared with this clone
ready · first check can run

What bay cuts

2.4 minmeasured · one team

One team's median wait from bay merge to main, on 24 November 2026. On 26 October, before six changes to its setup, the median was 465 minutes.

How one team got there →
1,000×target
less network to start work, on a warm cache
50×target
faster to the first check that can run

The two figures above are targets, not results. We compare with an agent that first copies the whole repository. We will also measure against a tuned setup with a good merge queue. We will release the benchmark scripts and raw results, so anyone can run them again.

Agents submit and leave.

While a runner runs, it finishes the merge.

bay merges nothing your policy did not clear.

A change no pre-merge check covers waits for no check, and the result lists the skipped checks under not_required. A waived check stays a named gap in coverage_gaps. With no policy file on main, bay refuses to merge. To merge without checks, the policy must say unchecked = true.

Unknown never passes.

A crashed or silent check blocks the merge. A waiver is a named gap, never a pass. A person waives only a check you mark waivable, or a check on a repair of the policy itself.

Refusals say what to do.

Each one names the next step for the agent.

The fleet, as one command shows it

Click a row

ready 4 of 4 greenrunners 1 · queue 6locks 1red 1open talks 1
laptop-1doctor ok · hooks on
build-boxdoctor ok · hooks on
gpu-boxdoctor ok · hooks on
ci-runnerdoctor ok · hooks on
$ bay status --allchange c7k2m4qa · laptop-1
$ bay merge
queued · state submitted · waiting_for runner
$ bay merge c7k2m4qa --wait=3600 # a background task
runner ci-1 · a batch of 3 · checked as one tree on main e4f5a6b
unit pass · lint pass · build pass
merged 9d1e07c · the batch's last commit is the tree that passed
the background task heard it 9 min after the session went idle
$

Six sessions, one untracked change and one runner, on four machines. One change merged in a batch after its agent left. One agent learned that an input changed, and one waits for a person's yes. One works where a post check turned main red, and a runner found the merge that did it. One holds the lock on a design file, and owes an answer to a talk. One change stopped because a check did not answer.

This is an example of the bay status --all view. The ids, names and paths are examples.

The words bay uses · one meaning each

main

The one branch bay merges into, such as main or dev. You name it, and bay only adds to it.

change

One id for one intended outcome. The id stays when the agent revises the work.

view

A sparse checkout of the paths that one change needs.

candidate

The exact result that bay builds from the change and the latest main, then checks and merges.

check

Any command that tests a candidate and returns a result. It runs before the merge, or after it as a post check.

policy

The file .bay/policy.toml on main. It lists the checks each change needs, and bay merges nothing it does not clear.

evidence

A record of what one check, review or runtime observation saw on one candidate, signed when your registry signs everything.

merge

One checked candidate added to main. bay merge submits a change and returns at once.

runner

The process that runs the checks on a candidate and merges it into main. Runners on several machines share one queue.

batch

Queued changes that a runner checks as one tree. When the tree passes, they merge in one push.

post check

A slow check that runs on main after the merge it judges, and never blocks that merge. When it fails, bay names the merges that could have caused it.

lock

One session's hold on a file that never merges, such as a design file. A change without the lock does not merge.

talk

One ask from an agent to another agent or a person: a change, a decision or a check. It travels through your Git remote.

lane

Branches for experiments, such as research/*. Their changes run checks against main, and never merge into it.

plugin

A program that bay calls at one of its edges: checks, notices, wake-ups and large-file stores.

origin

A bay host near your machines. It answers bay's reads, and keeps a hosted remote such as GitHub current.

What bay does

Every step, from first edit to production.

bay covers each step of a change, from the first edit to a promotion. Turn on only what your team needs. Each step keeps its record in Git.

More merges an hour

A runner can batch changes, check the next batches early and run checks side by side. Runners on several machines share one queue, and one takes over when another stops. Each machine can cap its share, and on Linux it can hold checks while it is busy.

Checks after the merge

Slow whole-tree checks can run on main after the merge, and never block the merge they judge. When one fails, bay names the merges that could have caused it. With bisect_post, a runner finds the one merge, and a fix or an undo goes first.

Any coding agent

Every agent uses the same commands and JSON results. With Claude Code or Codex, bay hook also refuses a stale write early. The bay skill teaches any coding agent the whole loop. Merge the hook entries once, and every clone takes them from main.

Agents ask each other

bay talk asks an agent on another machine, account or agent product for one change, decision or check. A talk travels through your Git remote, and the recipient acks it. With Claude Code and a key registry, a person can answer an agent's question from another machine. The policy on main turns them on with [talk] enabled = true and [agent] question_wait_s.

A person's yes where it counts

An approval check holds a change to chosen paths, such as billing/, until a person signs a yes. The yes names the exact checked candidate, and only an enrolled approver's key counts. Changes to other paths merge without one.

Four words for people

People who are not developers use bay save, bay waiting, bay approve and bay undo, usually through their agent.

Promote to staging and production

A promotion moves a branch such as staging only to a checked commit from main. Its rule names the checks that must pass, and how old the commit must be. bay status shows which commit is ready, and your deploy tool reads the branch.

Lanes for experiments

A lane holds work that must never reach main, such as a research spike. Its changes run checks against main, and bay hands back the verdicts. bay refuses to merge another change that carries lane commits.

Built on plain Git

One program. Plug-in edges.

bay owns three things: identity, validity and recovery. Plugins do the rest. Your repository stays a plain Git repository. Four commands make the daily loop.

One Rust program

bay is one Rust program that calls the git you already have. Ready builds cover macOS and Linux, on ARM and Intel. cargo build builds it from source for other targets, Windows too. It works on SHA-256 and reftable repositories, the Git 3.0 defaults. Every failure test also runs on them.

No database, no server

Every lasting fact is a Git object that a ref can reach. Local files are caches, plus failure receipts that wait for the next sync. Runners on your own machines, or your CI, merge changes. With no runner, bay merge --wait can run the merge on your own machine.

Any Git host

Use GitHub, GitLab, a bare repository over SSH, or bay host on your own machine. An origin near your machines answers bay's reads, and keeps a hosted remote such as GitHub current.

Your checks, as they are

A check is any command that returns a bay.check.result/1 document. Messages and runtime signals are plugins too. Your own tools can build on bay's public contracts, the way tools build on Git.

Large files, your own store

A video, a design file or a data set goes to your remote's own store, or to one you name. Git keeps its hash, so main names the exact bytes you saved.

No model in the decision

bay never calls a model, and it is not a review tool. Any review tool can read each merge after it merges, and add a review record. A review never decides a merge.

Free, open, private

Free for every team. Your code stays yours.

bay is free for any team, of any size, under the MIT licence. There is no paid tier, no account and no sign-up. bay runs on your machines, and your code goes only to your own Git remote. So it fits the most private repositories a company has.

Your code never leaves

bay has no server, and it sends no telemetry. Your code goes only where your own Git remote is. Besides your remote, bay itself only downloads its releases from GitHub, at most once an hour. You can turn that off.

Read every line

bay is one Rust program with five direct dependencies, and it forbids unsafe code. A test counts every command, flag and reason code. A new one must take a step away from someone. Ask your coding agent to read the source before you trust it.

Checks run in a sandbox

On macOS and Linux, a check sees only its candidate, its own files and system files. It can also read the folders its machine names with bay.checkReadPath, read-only. A check with inputs = ["history"] also reads the repository's history, read-only. It gets no network unless your policy on main allows it. A machine can turn the sandbox off with bay.runnerSandbox, and each check record then says so.

Signed releases

A bay release key signs every new release. The install script and bay update refuse a release that does not verify.

Build it anywhere

Ready builds cover macOS and Linux, on ARM and Intel. The static Linux builds also run on ARM boards. Build it from source for Windows and other targets.

Build bay with us

We build bay in the open. To join the work, email the founders at hello@getbay.io.

Roadmap

What comes next, as agents write more of the code.

  1. Next

    Merge on your own origin

    In mirror mode, a merge already moves main on bay's own origin alone. Next, the runner that merges runs on the origin's machine, so the merge and the ref move stay local. A merge counts when the origin and one more origin hold it on disk.

  2. Next

    Refs only for main and releases

    Today bay keeps a few live refs for each change. A change ledger will move the records of each merged change out of live refs after a retention window. Live refs then stay few as merges grow. The origin already uses Git's reftable format, and the other stores will move to it.

  3. Next

    Shared caches

    Every job on a machine reads one shared object store, and bay will count its hits. An origin on the local network serves the rest, and the hosted remote becomes the cold tier. bay already uses a check result again when its inputs did not change. Next, it will do the same for each test unit.

  4. Later

    Checks with no checkout

    A check that needs only the diff or a few files will read them straight from Git objects. A virtual checkout gives other checks each file the first time they open it. It records each path that a check opens. bay adds the virtual checkout only if a measurement shows that it is faster.

  5. Later

    bay refreshes conflicts

    Today bay refuses a change that no longer merges, and the agent refreshes it. bay will start that refresh itself and give the agent only the files that conflict.

  6. Later

    Review and access rules

    Approval rules will know a change to comments from a change to logic. Write rules will apply to each directory, by key class. A team can then give an agent one part of the tree and not the rest.

Let your agents ship.

bay is for teams whose agents write code faster than the team can merge it. It is free and open source under the MIT licence, with no paid tier. Install it in one command, or tell us about your fleet and we will help you start. To teach your coding agent bay, add the bay skill: npx skills add gudjon/bay --skill bay -g. To help build bay, email the founders at hello@getbay.io.

hello@getbay.io