Skip to content
bay
How it worksFleetRoadmapDocsBlogGitHub ↗
Early access
Docs menu

Start here

  • Overview
  • Install
  • Quickstart
  • Concepts

Using bay

  • Agents and hooks
  • Executors

Configure

  • Configuration
  • Keys and the registry

Reference

  • Update
  • CLI reference
  • Results and refusals

Start here

  • Overview
  • Install
  • Quickstart
  • Concepts

Using bay

  • Agents and hooks
  • Executors

Configure

  • Configuration
  • Keys and the registry

Reference

  • Update
  • CLI reference
  • Results and refusals

Using bay

Executors

The executor finishes each landing after the agent leaves.

bay is in development. These pages describe bay as it will ship.

bay land returns at once with an operation id. An executor then runs that operation to an outcome. It claims the operation, runs the required checks, and lands the candidate on trunk. It signs the landing commit with its own executor key. When it cannot land, it records a refusal with a reason and a next step.

Run the local executor

bay executor run drives queued operations on one machine. It makes a pass every 10 seconds by default. --once makes one pass and exits. Run it under a supervisor that restarts it.

sh
bay executor run                    # a pass every 10 seconds
bay executor run --interval-s 30    # a pass every 30 seconds
bay executor run --once             # one pass, then exit

Run at least two

One executor is a single point of failure. Run at least two, so that one can take over from the other. An owner renews its claim with a heartbeat, every 10 seconds by default. After 60 seconds with no heartbeat, another executor can claim the operation. A replaced executor can never land that operation. After a reboot, an executor waits one full lease before it claims.

Operation states

An operation moves through submitted, admitted, running, checked and published. It can also end as blocked, failed or superseded. Each step is a commit in the change chain, so bay status reads the true state.

The external executor contract

A CI system or a queue host can act as an executor. It implements five actions that read and write JSON. No agent types these actions.

ActionInputWhat it does
submitop id, attempt id, request digest, candidateIdempotent. The same op id and request digest return the existing job. A different digest under one op id is refused.
inspectop idReturns the durable job id, its owner, its state, and the receipts so far.
resumeop idReconciles an interrupted job with the work already done. Never repeats a finished check unit.
cancelop id, reason (cancelled or superseded)Records the request and reports whether the landing already happened. An executor that no longer owns the job must not land.
completeop idReturns the evidence for the exact candidate and the inputs it actually used.

An executor needs its own key in the executor class. It never holds or uses an agent key. bay records each step by op id, so a crash between steps loses no work.

← PreviousAgents and hooksNext →Configuration

On this page

  • Run the local executor
  • Run at least two
  • Operation states
  • The external executor contract
how it worksfleetroadmapblog© 2026 bay contributors · MIT
Built by Gudjon Gudjonsson, founder and CEO of OZ →Sponsored by OZ