Abort a broken agent at its first commit, not its last.

Sentinel first-commit early-abort

Intent — A health check on an agent's first commit that surfaces orphaned-worktree and broken-substrate failures at minute zero, before the agent burns its whole budget producing work that can never land.

SummaryAbort a broken agent at its first commit, not its last.
TargetAgent · Gates & merge-train
Formquality-gate
EnforcementHard (deterministic) · blocking — aborts the run on a failed substrate assertion

Motivation — the failure it kills

An agent dispatched into a subtly broken worktree (a missing marker file, stale substrate, an empty submodule, a wrong branch) will work happily for 30–60 minutes and then fail at commit, or produce work that cannot be rebased or cherry-picked. The failure is invisible until the end, so its cost is the entire dispatch: the whole agent budget spent on unlandable work. It recurs whenever the substrate drifts between dispatch and consumption, and compounds because each occurrence wastes a full run, not a small step.

Why it's not just "let it fail at merge"

Failing at merge is failing late, after the agent has spent its budget. The sentinel moves the substrate-health check to the first commit (t≈0), converting a 60-minute waste into a one-minute abort. It validates on the production path (the actual brief, the real dispatch), not a pin-test in isolation, so it catches the invisible feedback loops (caps, scope filters, priority inversions) that only manifest when the substrate runs end-to-end against real work. Failing at merge does surface the break, but only at t=60, after the budget is spent. The sentinel surfaces the same break at t=0 on the real path, while the run still costs a minute to abandon.

Mechanism

On the agent's first commit, the sentinel check asserts the substrate is healthy (worktree root matches, per-agent marker exists, branch is the expected worktree-agent-<id>, CWD is under the worktree) and aborts the run if any assertion fails. It is the commit-time twin of the boot-time Dispatch self-check an agent runs as its first step: boot-check catches a bad start, sentinel catches a substrate that broke after boot. It lands AUDIT-ONLY and is promoted to BLOCKING after a session of clean events.

Prerequisites

Consequences & costs

Known uses

Related mechanisms