AI agent code verification means checking what an agent actually built, not what it says it built. Keep prompting the way you do now: Cotterpin hooks into your agent, and every time it says “done” Cotterpin runs a real build, the real tests your change reaches, and an adversary that tries to break the fix. Only work that survives lands.
Keep prompting the way you do now. Cotterpin checks every “done”.
It runs quietly in the background while you work with your agent — or on demand when you want a second opinion, a whole task handled, or an old codebase made trustworthy. Checking your work happens right on your branch; new work gets its own branch, worktree and pull request.
Claude Codeexample
$ cotterpin initSets up this repo. Asks before it looks.
$ cotterpin connectFinds your agent CLIs. Stores no secret.
$ cotterpin doctorChecks your machine, with the exact fix.
Each language pack knows the shortcuts its agents take and the defects they leave. Pick yours and watch a real task: the pack's guards refuse each shortcut with the reason and the fix, and at the commit its code gates find the defect the tests missed — often the real cause of the bug. Every refusal quotes the pack's own rule. Each session runs on the agent you already use (Claude Code, Codex or Grok), and Cotterpin's live header shows the task, the model and effort running it and each step, with today's summary on the line below.
Illustration, Java: asked to fix invoices that drop a repeated SKU, the agent first runs the whole test suite and is refused under java-unscoped-test; it then builds one Maven module with -pl but not -am and is refused under java-pl-without-am; with -am and one selected test it reproduces the bug. Its fix uses Collectors.toMap, and the commit is refused because the TOMAP-1 gate finds that toMap throws on the very duplicate SKU the fix is for. The agent adds a merge function, proves the test fails without the fix and passes with it, and the commit lands.
~/billing-service · Java pack
Illustration · example session
Illustration, .NET: asked why checkout times out under load, the agent tries to inspect the production database with EF Core and is refused under dotnet-ef-remote-database. It adds a timeout and a retry, its build fails on a nullable warning, and switching warnings-as-errors off is refused under dotnet-warnings-silenced. At commit, the CS-SYNC-OVER-ASYNC-1 gate finds the real cause: an async method blocking on a task. The agent awaits it, the build passes with no warnings and the commit lands.
~/Orders.Api · .NET pack
Illustration · example session
Illustration, Python: asked to stop a nightly export hanging, the agent runs pip install and is refused under python-system-pip, then adds the package with uv through Cotterpin. It tries to upgrade every dependency at once and is refused under python-blanket-upgrade. At commit, the PY-REQUESTS-NO-TIMEOUT-1 gate finds a requests call with no timeout, the real reason the export hangs; the agent adds a timeout and the commit lands.
~/export-service · Python pack
Illustration · example session
Illustration, Angular: the build fails its bundle budget and the agent raises the budget in angular.json; Cotterpin refuses it under angular-budget-raised. The agent lazy-loads two routes, then tries to silence a type error with @ts-ignore and is refused under angular-suppression-added. At commit, the NG-LAZY-STATIC-IMPORT-1 gate finds a component that is still imported eagerly, so it stays in the initial bundle; the agent removes the import and the build fits the original budget.
~/shop-web · Angular pack
Illustration · example session
Illustration, Terraform: asked to add and deploy a bucket, the agent runs terraform plan in a module whose state lives in a remote backend and is refused under terraform-operator-only, because only the operator touches real infrastructure or its state. It checks the code with terraform validate instead. At commit, the TF-PROVIDER-UNPINNED-1 gate finds a provider required without a version constraint; the agent pins it, the commit lands, and the operator reviews the plan and applies it.
~/platform-infra · Terraform pack
Illustration · example session
Only where you set it up
You install Cotterpin's adapter once for your machine, and your agent's hooks then run in every repository you open. Cotterpin answers only in a repository you set up with cotterpin init; everywhere else it says nothing and records nothing. Once a session has worked in a Cotterpin repository, its guards stay on even if the agent steps out of it.
Illustration: in a side project without Cotterpin, the agent's git commit with --no-verify goes through and Cotterpin says nothing. In a repository set up with Cotterpin, the same command is refused under git-hook-bypass. When the same session changes to /tmp and tries again on that repository, it is still refused.
one agent session · two repositories
Illustration · example session
Built to catch what other checks wave through
A verdict is only worth trusting if the thing giving it can't be talked round. These are the parts that make Cotterpin's verdicts hold.
⛨
Gates that can say no
Mechanical checks that block a change — not suggestions an agent can talk its way past. 157 for Java and 51 for any language, each born from a real failure. Only gates with a zero-false-positive record block from install; the rest advise until they earn it.
⚔
An adversarial refuter
A second agent whose only job is to break the fix: races, retries, edge cases. If it can, the work goes back.
#
Receipts bound to their inputs
Every verdict is backed by a receipt bound to the exact inputs it checked. Change an input and the proof is re-run — never reused.
⚑
Every agent action, risk-tiered
Each tool call is read, low-risk write, sensitive or destructive. Destructive ones — git reset --hard, --no-verify, an agent editing its own settings — wait for your approval, confirmed with your account password — or Touch ID, on a Mac where Touch ID is enabled for sudo. Every decision lands in an action audit log.
⚷
Credentials never reach the agent
An agent can't read .env, cloud credentials or the environment into its context — judged by effect, not by a list of programs — and everything Cotterpin prints passes through one redactor.
◎
Memory that's enforced
cotterpin memory keeps facts per user, repository and task, with provenance. A fact moves to a wider scope only with a person's signed approval, and every rule memory names the hook or gate that enforces it — memory audit checks it's really wired.
Δ
Delta-only, and fast
Only the tests your change can reach are re-run. The agent hook, cotterpin --version and the commit tier are held to measured speed budgets — no more than 10% over baseline on any measured path, or the release doesn't ship.
⌂
Local-first
Cotterpin never receives your source, diffs or prompts. Only your chosen model provider sees your code, under your own account.
⇄
One harness, any agent
Adapters for Antigravity,Claude, Codex and Grok: cotterpin adapters install antigravity|claude|codex|grok, once per machine, in the tool's own folder — nothing is added to your repositories. Same guard rules for all four, so you can switch agents without rewriting your rules.
A gate earns the right to block
A check that cries wolf gets switched off, so Cotterpin is careful about what it blocks.
Blocking is earned. Only gates with a zero-false-positive record block from install. The rest advise — they tell you what they found — until their record earns them the right to block.
Every finding says why and where. A refusal names the rule, the file and the line, and the exact command that fixes it.
Overrides have a name. Switching a rule off is allowed, never anonymous: it takes a person's signed approval and a reason, recorded with the change.
Try it without risk. On the free Watch plan nothing is ever blocked: you see what Cotterpin would have caught, session by session, and decide for yourself.
Illustration: a commit labelled as a fix is refused because no test proves it; the refusal names the check, why it exists, the fix and the exact command; the developer records the red and green proof and the commit then passes its checks in seconds.
~/payments-service
Illustration · example output
Watch your agent work, live
Above your prompt, Cotterpin shows what your agent is doing right now: the task, how many steps it has taken, the tool it is using and the model and effort running it. When it runs several things at once, each tool or sub-agent gets its own row with its model, how long it has run and a bar against how long that tool usually takes on your machine. You can see at a glance whether it is thinking, testing or stuck.
Illustration: the run band above the prompt. The top line reads IMPLEMENT, the step count, the tool in use and its model, and the elapsed time. While a test run and a sub-agent on a smaller model run at once, two rows appear under it, each with its model, its time and a progress bar; when they finish the line goes back to thinking.
Claude Code · above the prompt
Illustration · example session
Every week, a report of what Cotterpin caught and saved.
Good protection is invisible — the bug that never shipped looks exactly like a quiet day. So Cotterpin shows its work. At the end of every agent turn it tells the session what it caught, and every week it adds it up: the runs that landed, what it refused, and what model routing saved, in tokens on your plan and in dollars at API prices. cotterpin report measures the whole system — Antigravity,Claude, Codex and Grok alike. On Pro, that's everything it stopped. On the free Watch plan, it's everything that slipped through while it was only watching.
Measured, not guessed. Every number comes from the trajectory: one redacted line per decision Cotterpin made, kept inside your repository's git folder.
Prices are never guessed. Cost per landed change uses the prices you set; token counts are read from your agents' logs only if you say yes.
Computed on your machine. The report is local; nothing is uploaded or sent to us.
every Monday · example
Cotterpin · your week · 29 Sep – 5 Oct Runs6458 landed6 waited for you Agent time15h 20m Time Cotterpin added2m 41s(0.3% of agent time) Cotterpin fired 1,412×✗ 87 refused, 5 destructive Cost$117.80baseline $195.24 Saved$77.44 this week▲ $9.10at API prices Tokens+66% extra tokenson your plan (≈ $132 of a $200 plan) On track≈ $335 / month · ≈ $4,000 / year Pro ($100/year) would pay for itself inunder 2 days You◆ ScoutBug Hunter grade 1 of 7 PlanWatchfree(reports what Pro would enforce) Bugs4 reported3 verified1 pending Rewards14 points1 free month earned Detailscotterpin report weekly
Every gate exists because a real agent failure slipped past everything else. When we find a new one, we ship a gate for it — and whole new language packs as they land. You decide when each one reaches your code.
Nothing installs itself.cotterpin update --fetch downloads the newest signed release your licence covers — after asking — and nothing is uploaded.
Your repository moves only when you say so — with cotterpin upgrade, which shows the plan first and writes nothing until you add --apply.
Never mid-run. An update refuses while a Cotterpin run is in progress in the repository.
Pro gets new packs first — the day they ship. Watch follows 60 days later.
Signed and verified on your machine before anything runs — and cotterpin update --rollback undoes the last update.
Example: Cotterpin asks before contacting the licence service, downloads a newer signed release, verifies its signature and every file, and keeps it in the local release cache without changing any repository. The repository moves to it only when the developer runs cotterpin upgrade.
~/payments-service
example
Questions people ask
How does Cotterpin check that an AI agent's work is done?
It runs the repository's own build and the tests the change reaches, and its gates, before the commit lands, and keeps a receipt bound to the exact inputs it checked. A second agent then tries to break the fix; if it can, the work goes back.
What happens when Cotterpin refuses an agent's action?
The action does not run. The agent is told which rule refused it and how to fix the cause, and a destructive action waits for you to allow it, which the agent cannot do for itself.
Can I see what my agent is doing while it works?
Yes. Above the prompt Cotterpin shows the task, the tool and model in use and the elapsed time, and a row with a progress bar for each tool or sub-agent running at the same time.
See it in action.
Free, with no time limit. No credit card required.