Back to Blog

Explainers

Three-Lane Agent Governance: Where Tripwires Fit Between Prompt Rules and OS Sandboxes

By · Published · Updated · 5 min read

Three-lane governance architecture for Agentsitter 0.2.0 (alpha): routine Lane 1 execution, cross-family Lane 2 advisor checks and human-signed Lane 3 approvals inside broader OS and repository controls
Three-lane governance architecture in Agentsitter 0.2.0 (alpha). Tripwires reduce accidental irreversible actions; OS sandboxes and server-side branch protection enforce hard containment.

Engineering leaders rolling out autonomous coding agents face the same two failure modes. Prompt-only rules ("never push without asking") erode as context windows fill. Blanket approval prompts on every shell call keep humans safe at the cost of turning an autonomous worker back into a slow autocomplete.

Agentsitter 0.2.0 (alpha) from Search-Sherpa/agentsitter (MIT license) formalizes a middle layer: three-lane command governance implemented in standard-library Python 3.9+, git hooks, a harness hook, and OpenSSH ssh-keygen -Y signatures. Evaluating it properly requires placing it in the right architectural layer.

1. Four layers of agent control, and where a tripwire sits

Conflating cooperative workflow controls with security isolation is the fastest way to misprice risk. A complete architecture separates four layers:

  1. Layer 1: Behavioral instructions. SKILL.md and system rules are cheap to write, covers architectural judgment that regexes cannot detect, and fails softly when models drift.
  2. Layer 2: Local tripwires (Agentsitter). Rule-based hooks and signed approval checks on recognised commands, git operations, and protected file edits. Reduces the chance that recognised irreversible actions slip through unnoticed, at the points where it is wired in, without stopping routine edits and tests.
  3. Layer 3: Operating-system isolation (containers, VMs, restricted credentials). Confines what the user process can read, execute, or reach on the network even if a command evades classification.
  4. Layer 4: Server-side enforcement (branch protection, required reviews, deployment approvals, scoped tokens). Prevents a compromised workstation or bypassed local hook from mutating protected branches or production infrastructure.

Agentsitter explicitly occupies Layer 2. Its README (what this does and does not enforce) states upfront that it is a tripwire, not a sandbox. Teams that treat Layer 2 as a substitute for Layers 3 and 4 inherit every bypass in its documented threat model.

Search-Sherpa/agentsitter is published on GitHub only, not PyPI. Never install via pip install agentsitter (an unrelated PyPI project holds that name), and always reference the full Search-Sherpa/agentsitter path because unrelated GitHub repositories use the same bare name. Install by cloning Search-Sherpa/agentsitter and running pip install ..

2. Why do three lanes beat binary allow/deny lists?

Splitting commands by reversibility and blast radius keeps engineering attention focused on the decisions that actually carry irreversible cost:

  • Lane 1 (routine, zero friction): source edits, local tests, read commands, git status, and cleanup inside scratch directories. Keeping this lane friction-free preserves agent throughput.
  • Lane 2 (non-trivial, cross-family advice): rule-matched dependency changes, schema migration authoring, and large or sensitive change sets (default >8 files, >300 lines, or auth/payments/CI/infra paths). Builder family identity is resolved from AGENTSITTER_HOST_FAMILY or session marker environment variables (not IDE detection); requesting an advisor from the builder's own model family is refused with exit 13 (wrappers exit 7). Requires one consult from a different model family (claude, gemini, codex, or grok) with a bounded budget (default 2 attempts per decision, 6 per window). Lane 2 is explicitly advice, not a gate: the builder writes the brief, two failed consults fall back to logged builder judgment, and architectural forks without a matching rule still depend on the agent choosing to ask.
  • Lane 3 (irreversible, signed human approval): at wired hook points, covers commits, pushes, merges, rebases, history rewrites, publishes, deploys, infrastructure applies, non-local HTTP writes, mail, secret-store or .env writes, privilege elevation, deletion outside scratch directories, and governance or protected-path edits. Unlocks via a single-use, 15-minute-TTL approval signed out-of-band by a human with ssh-keygen -Y sign and verified against allowed_signers.

3. What does a Lane 3 approval actually bind to?

A signed approval is only as strong as what the signature covers. The README's approval flow spells this out per action type:

What a Lane 3 approval covers in Agentsitter 0.2.0 (alpha)
ActionThe approval coversImplication
CommitRepository, staged tree and parent commitRestaging needs a new approval, though a concurrent restage can race the hook
PushRepository, remote and exact ref updatesApproving a feature-branch push does not approve a push to main
Protected-file editTool, path and the full edit, printed before signingEdits to the tripwire itself are shown to the human verbatim
Any other commandCommand text and working directory onlyAn approved npm publish ships whatever the directory holds within 15 minutes

For deploys and publishes, the signature binds intent, not content. Where content matters, release through a commit or tag the hooks bind, then deploy from CI behind server-side approvals.

4. Maturity assessment of Agentsitter 0.2.0 (alpha)

Before piloting any alpha governance tool, separate verified engineering facts from open gaps:

  • Verified cross-platform test baseline: 10/10 CI matrix jobs green on commit a352d68 (CI run 44875717343) across Linux (ubuntu-latest Python 3.10 to 3.14 and ubuntu-24.04 Python 3.9), macOS (macos-latest Python 3.9 and 3.14), and Windows (windows-latest Python 3.9 and 3.14), exercising 169 tests across 7 modules (44 tracked files) with stub CLIs and throwaway SSH keys.
  • Narrow manual signing evidence: a real approval at a terminal, with a passphrase-protected key, has been checked by hand on Windows 11 (OpenSSH for Windows 9.5 in PowerShell) only, with release 0.1.0 (named agent-babysitter; 0.2.0 renames it). Neither 0.2.0 nor Linux and macOS interactive terminal signing has had a hand-run passphrase check.
  • Vendor CLI wrapper assumptions: one live smoke call per wrapper on Windows 11 (2026-11-19) confirmed flag acceptance on Claude Code 2.1.319, codex-cli 0.162.1, and agy 1.5.13, while grok 1.0.77 exited 5 on an expired login preflight. Flag acceptance does not verify vendor runtime lockdown, and future CLI releases can alter flags.
  • Known structural limits: without the harness hook, agentsitter run and agentsitter check are opt-in, --no-verify skips git hooks, and an agent can edit ~/.config/agentsitter or ~/.local/state/agentsitter. Even with hooks wired, pattern matching can be evaded by scripts or Makefiles; home/venv Python binaries remain writable; commit approvals have a small index TOCTOU window; concurrent consults can overrun the post-call budget counter; and unencrypted private keys defeat the signing boundary.

5. Which control layer catches which failure?

Walking failure modes through all four layers prices the tripwire honestly (a design analysis from the documented limits, not a test result):

Failure modes mapped to the four control layers
Failure modePrompt rulesAgentsitter (hooks wired)OS isolationServer-side controls
Agent pushes to a shared branchSometimesYes, signed approvalOnly if credentials are withheldYes, branch protection
Deploy hidden in a Makefile targetSometimesOnly with a rules.extra entryPartlyYes, with deploy approvals
Agent edits harness settings to drop the hookNoYes, protected pathYes, if read-onlyNot applicable
Agent reads an unencrypted signing keyNoNo, reads are not gatedYes, if key is outsideNot applicable

Only server-side enforcement survives a compromised workstation with hooks bypassed, so it is not optional. Agentsitter earns its place by cheaply catching the common accidental case: an agent that sincerely believes a push is the next step after prompt rules have faded.

6. Starter Architectural Decision Record (ADR) for a bounded pilot

Teams considering Agentsitter 0.2.0 (alpha) should pilot it on one non-production repository with explicit verification criteria before rolling it out more broadly:

ADR: Three-lane local tripwire for autonomous coding sessions

Status:    Proposed (bounded alpha pilot)
Tooling:   Search-Sherpa/agentsitter v0.2.0 alpha (MIT, cloned from GitHub; pip install -e . per the README)
Scope:     One pilot repository, developer workstations with harness hooks enabled
Controls:
  - Lane 1: local reads, edits, tests, scratch cleanup run unattended.
  - Lane 2: dependency changes, migrations, and large/sensitive diffs trigger
            one cross-family advisor consult (budget 2/decision, 6/window).
  - Lane 3: at wired hook points, recognised irreversible commands (commits,
            pushes, publishes, deploys, external HTTP writes, mail, secrets,
            non-scratch deletes, privilege elevation, governance edits) ask for
            a passphrase-protected or hardware-backed ssh-keygen -Y approval
            in an interactive human terminal (900s TTL, single use).
Non-goals:
  - Does NOT replace OS/container isolation or server-side branch protection.
  - Does NOT ensure vendor CLI read-only lockdown across CLI upgrades.
Exit criteria before wider adoption:
  1. Manual interactive TTY + passphrase signing verified on every team OS
     (Linux, macOS, Windows).
  2. Team-specific deploy/release wrapper scripts added to rules.extra.
  3. Measured false-positive rate and consult latency over a 2 to 4 week pilot.

Next steps

Evaluate the source code and documented limits directly before wiring hooks into daily work. The hands-on setup guide walks through key generation and Claude Code hook configuration, and the repository teardown details the Python modules, git-hook hardening, and bypass catalog.

Add ClaudeSkillsGuide as a preferred source on Google