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

Agents and hooks

How a coding agent learns bay, and what the hooks of each agent product add.

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

The bay skill

bay install copies the bay skill to ~/.claude/skills/bay/. Claude Code loads that skill while the agent works in your repository. The skill tells the agent which command to run. It also tells the agent to read the JSON result on stdout. The skill grants no key and cannot move trunk.

bay doctor compares that copy with the skill of the installed bay version. A mismatch is red with SKILL_MISMATCH, and bay install fixes it.

Claude Code first

Claude Code is the first agent product that bay supports in full. Set product = "claude" in the [agent] table of .bay/config.toml. Then bay install adds hook entries that call bay hook <event>. bay doctor then needs Claude Code 2.1.302 or newer on that machine.

toml
[agent]
product = "claude"

What the hooks do

  • At session start, the hook prints the state of the active change.
  • Before a write, the hook refuses a write that bay already knows is stale.
  • Before a shell command, the hook blocks a fixed list of dangerous Git commands.
  • After each step, the hook records the files that the step read and wrote.
  • When an input of your change moves, the hook gives a one-line notice.
  • When a change needs repair, the hook can wake an idle agent.

Blocked shell commands

The hook blocks these commands before the shell runs them. A normal push of a refs/bay/* ref stays allowed.

text
git reset --hard
git clean -f
git clean -fd
git branch -D
git checkout .
git restore .
git push --force, git push --force-with-lease
git push of refs/heads/<trunk>

Hooks are an extra entry point

bay's promises do not depend on hooks. bay's own commands run every check that an operation needs. With hooks off, a stale write still cannot land. A session with hooks off shows as untracked in bay status --fleet.

Tiers

Each agent product gets one adapter behind bay hook <event>. The tier says how much hook support that product can give. In every tier, a stale write cannot land. bay doctor names the product, its tier, and the interfaces it lacks.

TierWhat bay has thereProducts
A. FullAn early refusal that fails closed, a step record, worktree ownership, and wakeClaude Code (2.1.302 or newer)
B. Refusal that fails closedAn early refusal that cannot fail open; no step record, worktree ownership or wakeCursor (failClosed)
C. Refusal that fails openAn early refusal while the hook runs; a crashed or hung hook lets the write through; no wakeCodex, Grok Build, Antigravity, Gemini CLI

In tiers B and C, an idle agent learns of a refusal at its next turn.

← PreviousConceptsNext →Executors

On this page

  • The bay skill
  • Claude Code first
  • What the hooks do
  • Blocked shell commands
  • Hooks are an extra entry point
  • Tiers
how it worksfleetroadmapblog© 2026 bay contributors · MIT
Built by Gudjon Gudjonsson, founder and CEO of OZ →Sponsored by OZ