← Blog

Hooks are the new stand-up

Gudjon Gudjonsson · Founder and CEO of OZ · 3 October 2026

Many teams now run several coding agents in one codebase, often in the same files. Most coordinate them the way they coordinate people.

A ticket, a branch, a pull request, a review, a merge. That rhythm suits people, who sync a few times a day.

An agent takes many steps a minute. By the time a merge finds a conflict, the agent has moved on.

The agent products have started to answer this with hooks. In this post, we look at what hooks give a fleet today.

We probed Claude Code and Codex directly, and read the documentation, source or changelogs of five more products.

From locks to branches to hooks

Every way of sharing a codebase answers one question: how do many hands change it without colliding?

The first answer was to serialize. Lock a file, edit it, release it. One writer at a time.

That is the simplest correct answer. It does not scale past a handful of people.

The second answer was to be optimistic. Let everyone write on a branch, and resolve conflicts at the merge.

Git made that the default. It works because people rarely collide, and they talk when they do.

The talking stays outside the tool: a stand-up, a review, a message in chat. Git keeps only the result.

The third answer is to move the check to the edit. That is what hooks are for.

What a hook is

A hook is a command the agent product runs at a fixed point. Before a tool, after a step, at a stop.

Claude Code has the richest set today. Three of its hook events and one hook option line up with old team rituals:

HookThe team ritualWhat it gives a merge tool
PostToolBatchthe stand-up: what I read and wrotea record of each step's inputs
WorktreeCreatetaking a card off the boardevery piece of work starts as a tracked change
FileChanged"heads-up, I am in your file"news of writes the agent did not announce
asyncRewakea tap on the shoulderthe work can wake the agent that must act

The loop of one agent step then looks like this:

text
agent plans a write to src/api/routes.rs
  -> PreToolUse     the merge tool checks: is that file stale against main?
  -> tool runs      the write happens, or is refused with a reason
  -> PostToolBatch  the step's reads and writes are recorded
  -> Stop           the session pauses
  -> asyncRewake    a later result wakes the session that must act

Edit time, not merge time

The interesting part is when a conflict gets found.

Git sees commits. A hook sees the write an agent is about to make.

So the conflict surfaces in the same second, in front of the agent about to cause it.

The hook refuses a stale write before it exists. Less is left to untangle at the merge.

The wake closes the other loop. A result no longer waits in an inbox nobody reads. It starts the session that has to act.

What we measured

The layer works. It is not yet something to build promises on:

  • Most hooks fail open. If the hook crashes or times out, the tool call goes ahead.
  • Few can fail closed. In Claude Code, Cursor and goose, a setting blocks the action when its hook fails.
  • Some fail closed in part. GitHub Copilot CLI blocks a tool when its hook crashes, not on a timeout.

  • Shell writes are invisible. A shell tool does not report which files it changed.
  • Watch lists can stay silent. Claude Code's dynamic watch list never fired in our tests.
  • Wakes can loop. A wake hook re-armed itself every 20 seconds when attached to the event it causes.
  • Products skip missing events quietly. A missing guard looks like a quiet one.
  • Support is uneven. Of six products, only Claude Code has all four hooks above.

Early CI webhooks went through the same stage: useful, product-specific, and best effort.

Why hooks need architecture

The cost of hooks is not tokens. It is design.

Once a harness exposes hooks, it is a platform. A platform needs a design, not only scripts.

Security engineering settled the test in 1972. James Anderson called it the reference monitor.

Linux still builds its security hooks on it. A layer that enforces anything must be:

  1. Complete. It sees every access, with no path around it.
  2. Tamper-resistant. It cannot be bypassed, fail silently, or be switched off.
  3. Small enough to verify.

By default, today's agent hooks fail all three.

A shell write never reaches the file-write hook. Most hooks pass the action through when they crash. They run arbitrary scripts across a process boundary.

So today's hooks are sensors, not guards. That is normal. Every platform starts there.

What a harness has to decide is concrete:

QuestionWhat we sawA sound answer
What is one unit of work?most hooks fire per tool callone step: a model request and its tools
What happens when a hook fails?most fail open, silentlyeach hook declares it, and a guard fails closed
Can a hook trigger itself?a wake looped, and stop hooks loopednever from the turn it causes
Who acted?subagents have an id, but some helpers do notevery actor is named in every event
What can the hook not see?shell writes, some watched filesthe gap is stated, and truth is read from state
Can you replay what happened?most events vanish after the calla durable log of events
What is the contract?unknown events skipped without a wordversioned events, and capabilities you can ask for

None of these are new. Interrupt handlers, signals, middleware and event logs hit them decades ago.

Sixteen months

All of this happened in about sixteen months.

DateProductWhat happened
30 June 2025Claude Codehooks are released
20 February 2026Claude CodeWorktreeCreate and WorktreeRemove
19 March 2026Codexthe first hook
24 March 2026Claude CodeFileChanged
23 April 2026Codexhooks are declared stable
about May 2026Anthropicits monorepo starts to leave Git
by 12 June 2026Antigravitythe Antigravity CLI has hooks
28 July 2026Antigravityhooks for Google's hosted agents on the Gemini API
13 August 2026DeepSeekDeepSeek Harness: everything is a plugin
16 September 2026Antigravitya fix: the CLI could drop hook files without a word
1 October 2026Claude CodeasyncRewake is in use
8 October 2026Claude Codea hook can block when it fails
13 October 2026Anthropicit describes its new source control
Timeline of agent hooks and source control at scale, June 2025 to October 2026.

In the same months, Anthropic rebuilt its own source control.

Its merges went from about 2,500 a day in May to over 30,000 in September.

At that rate the bottleneck is the server, so it moved a large monorepo off Git, to its own system.

The agent products took on the same pressure from the other end. They let every team steer agents at each step, on ordinary Git.

Two shapes: hooks and plugins

In August, DeepSeek released DeepSeek Harness. It has no hooks of its own.

Every part of it is a plugin on a small kernel called Cordis, including the agent loop itself. As of October 2026, it also holds experimental bridges that run Claude Code's and Codex's hook files.

Its typed events cover what Claude Code's four hooks cover. A step event records each model call with its tools.

So two shapes now compete. Hooks run beside the agent. Plugins run inside it.

The hook names converge. Grok Build, GitHub Copilot CLI and Devin CLI read Claude Code's hook files. Antigravity uses the same core names.

It has not settled. Google's local agent says PreToolUse. Its hosted agent on the Gemini API says pre_tool_execution.

Not everyone reads hooks as a stand-up

The stand-up is our reading. No vendor describes its hooks that way.

Look at where each product puts its work, and four ideas of a hook appear:

ProductA hook is forWhere the work goes
Claude Codethe flow of work between agentsworktrees, changed files, waking an agent
Codexadministrationtrust checks, company hooks users cannot turn off, usage metrics
Antigravitya permission gatedeny, ask, force-ask, auto-approve
DeepSeek Harnessits own plugins, plus bridges for other products' hook filesthe whole agent is plugins on a small kernel

Each idea serves a different person. The lead who runs the agents, the admin, the user who approves a step, the developer.

Codex is not behind. It builds something else: a control plane an admin can trust.

So the stand-up is one line of design, not a consensus. It is one more sign that the layer has not settled.

Toward a shared contract

Agents now plan, build, review and learn inside one session. A two-week sprint can shrink to an hour.

The signals still need a place to travel: status, blockers, ready for review, evidence of done. Hooks fire at the moments the work changes state.

So the stand-up is only the most familiar piece. Review gates and a definition of done could travel on the same events.

Builders already do this by hand. Open-source boards move a card to In Progress when an agent's hook fires. The shared contract has not caught up.

Today that is safe only where a deny holds. In Claude Code, Cursor and goose, a crashed hook can block the action, once you set it to. In Codex and most others, the action goes ahead.

Tool access looked like this before MCP. Every host had its own way, and the cost showed.

Open contracts for hooks have started to appear:

  • Agent Hooks (AGENT-HOOKS-0.1), from the responsibleai group on GitHub: eight points, three verdicts, and tests that check a deny holds.
  • Agent Control Standard, from the OWASP GenAI Security Project: a hook asks a separate guardian before an action runs.

They split on failure. In Agent Hooks, a hook that crashes or times out counts as a deny. In the Agent Control Standard, a silent guardian lets the action go ahead by default.

Both are early. Both treat hooks as governance, not teamwork. No coding agent implements either one natively yet.

Both also trust the host. Neither is a security boundary on its own.

A shared contract needs little: fixed points, a clear verdict, and a host that honours a deny. Agent Hooks already writes most of that down. Each product can keep its own ideas on top.

The choices made in the next year about failure and shared events will decide what this layer can carry.

How bay uses hooks

We build bay so a fleet of agents can work on one main branch without a messy merge. It takes this split as its design:

  • Hooks are sensors. They refuse early, give notices and record each step. Each belongs to one product.
  • The guard sits at main. bay merges only what passed its checks on the latest main. Unknown never passes.
  • Git is the record. Every check leaves evidence in Git, signed once you add a key registry.
  • One contract for every product. bay has its own small set of moments, such as tool.before, for every product.
  • Capabilities are data. bay help --json declares each product's hook events, which ones can refuse, and what each cannot see.

bay's own merges work the same if a hook never fires. A product with weaker hooks hears a refusal later, at merge time, but bay still merges nothing stale.

Neither standard asks for a second judge outside the agent. bay keeps one at main, so a skipped hook still cannot get stale work merged through bay. Security and privacy, at getbay.io/docs/security, says when that guard also covers a push around bay.

Get started

bay is open source under the MIT licence.

Name your agent product in .bay/config.toml, and merge it into main:

toml
[agent]
product = "claude"   # or "codex"

Then bay install adds the hook entries. Merge that file into main once, and bay doctor checks them.

  1. Read the install guide at getbay.io/docs/install.
  2. Read how bay uses each product's hooks at getbay.io/docs/agents.
  3. If you run a fleet of coding agents, write to us at hello@getbay.io.

The hooks will keep changing. The record should not have to.

Since then

As of bay 0.3.1, bay has hooks for Claude Code and Codex. On Claude Code, bay's hook can refuse, and a crashed or hung hook blocks the tool call. On Codex, the hook refuses too, but Codex runs the tool when the hook fails. There it is a sensor.

bay's hook moments now have their own names, such as tool.before and turn.end. Hooks for Cursor, Grok Build, Antigravity and Gemini CLI are not built yet. Our post "Hooks are sensors. The guard sits at main." explains bay's moments in full.

As of bay 0.4.0, Grok Build runs bay's Claude Code hooks for its shell and write edits.

As of bay 0.6.117, bay's hook refuses a call only on purpose, on both products. A bay hook that crashes or hangs now lets the call go on. Main stays the guard.

Gudjon Gudjonsson · Founder and CEO of OZ