Skip to main content

Countercheck

Proof that AI work really happened.

AI coding agents often say "done, all tests pass" when it isn't true: they skip a failing test, edit the test so it passes, or never run it. countercheck verify checks the claim itself:

  1. It reads your checks from the base revision (before the agent's change), so the agent can't weaken them.
  2. It copies the agent's files into a clean folder and puts back any protected file the agent changed (your tests).
  3. It runs the checks in a macOS sandbox: no network, writes only inside that folder.
  4. It writes a receipt: the claim, what ran, the output, what the agent changed that it shouldn't have, the cost if known, and a verdict. Receipts are sealed with a SHA-256 hash, so edits are detectable.
$ countercheck verify --claim "Fixed the discount bug. All tests pass." --agent claude-code --cost-usd 0.42
countercheck receipt 9073a384e88f9d37  FAILED
  claim:    "Fixed the discount bug. All tests pass." -> CONTRADICTED by evidence
  checks:   .countercheck/checks.toml @ HEAD (locked), sandbox: macos-seatbelt (no network, writes only in the check folder)
  protected Modified: tests/test_pricing.py -> restored_from_base
  [FAIL] unit tests  (65 ms)  $ python3 -m unittest -q
         |     self.assertEqual(apply_discount(10, 150), 0)
         | AssertionError: -5.0 != 0
  cost:     $0.4200 (reported)
  - the worker changed 1 protected file(s); countercheck ran the checks with the base version
  - check "unit tests" failed (exit 1)

(The agent's own run said OK (skipped=1): it had marked the failing test as skipped.)

Install

You use Install with
Python (pip, a .venv, uv) pip install countercheck · uv tool install countercheck · or run without installing: uvx countercheck verify
macOS or Linux, Homebrew brew install datacrate360/tap/countercheck
macOS or Linux, any shell curl -fsSL https://raw.githubusercontent.com/datacrate360/countercheck/PROD/install.sh | sh
Rust cargo install --git https://github.com/datacrate360/countercheck countercheck
Direct download Releases: one file per platform + SHA256SUMS.txt

Builds: macOS (Apple silicon and Intel, one universal binary) and Linux (x86_64, arm64; static). The install script checks every download against SHA256SUMS.txt before installing. Windows is planned; use WSL for now.

Sandbox by platform. On macOS, checks run in the system sandbox (no network, writes only in the check folder). On Linux there is no sandbox yet: checks run as a normal process and the receipt says so; run Countercheck inside a container with networking off when you need isolation.

What's shipped, in progress and next: docs/ROADMAP.md.

Quick start

countercheck init                      # writes .countercheck/checks.toml, edit the commands
git add .countercheck && git commit -m "Countercheck checks"
# ... let an agent work ...
countercheck verify --claim "what the agent said"            # uncommitted work vs HEAD
countercheck verify --base main                              # committed work on a branch vs main
countercheck show .countercheck/receipts/<id>.json                   # re-check a receipt's seal

.countercheck/checks.toml:

protected = ["tests/**"]          # the agent may not change these; .countercheck/** is always protected
link = ["node_modules", ".venv"]  # git-ignored dependency folders to make visible (read-only)

[[check]]
name = "unit tests"
run = "pytest -q"                 # any command; runs with `sh -c` in the clean copy
timeout_secs = 600

Besides plain commands there are matrix, forbid, golden, budget and coverage checks: see docs/checks.md and the runnable example in examples/data-migration.

Exit codes: 0 verified · 2 failed (claim contradicted) · 3 unverified (nothing failed, but the checks weren't locked in the base revision, or none ran) · 1 error · 4 (countercheck show) receipt was edited.

Agent hooks

  • Hermes Agent: countercheck hook hermes-pre-verify keeps Hermes working while the checks fail.
  • Claude Code and Cortex Code: countercheck hook claude-stop blocks the Stop while the checks fail. See docs/hooks/claude-code.md.

Status

Early (v0.1, macOS first). Not yet: signed receipts (Ed25519), cost read from agent logs, read-back checks against real systems (databases, CRMs, web pages), a receipts UI, and Linux/Windows sandboxes. See docs/decisions/.

Build

Rust 1.90+: cargo build --release → target/release/countercheck. Gate: cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test. Countercheck also verifies itself: countercheck verify (checks in .countercheck/checks.toml).

Repository

  • crates/countercheck-core: pure logic (check file, protected paths, receipts, verdicts)
  • apps/countercheck: the CLI (git, clean copy, sandbox, runner)
  • eval/, docs/eval/: the evaluation against Hermes Agent (tasks with hidden tests)
  • packaging/, install.sh, pyproject.toml: release packaging (Homebrew, install script, Python wheels)
  • docs/decisions/: design decisions

MIT licensed.

Metadata

Release files for countercheck 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for countercheck 0.2.0
File Size Uploaded Provenance
countercheck-0.2.0.tar.gz 80.1 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for countercheck 0.2.0
File
countercheck-0.2.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
countercheck-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
countercheck-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
countercheck-0.2.0-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl Python 3 none macOS 11.0+ ARM64, macOS 10.12+ x86-64, macOS 10.12+ universal2 (ARM64, x86-64) Details

Total release size: 7.0 MB

Release files / countercheck-0.2.0.tar.gz

Download URL countercheck-0.2.0.tar.gz
Size 80.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e26f5dba576fc2fc10f13f3a1d6a8476a2ee30779c4ee02025669c5e70551053
BLAKE2b-256 checksum
How to use checksums
905de503ae9ff5a342ec7e484dd37ffbfc1af2759393ebca06d2afd8988c8915
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / countercheck-0.2.0-py3-none-musllinux_1_2_x86_64.whl

Download URL countercheck-0.2.0-py3-none-musllinux_1_2_x86_64.whl
Size 1.5 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
621a7f6229be2704d60541e2d4964b92b3fd8be5915982ea7062b7c14b0fabd5
BLAKE2b-256 checksum
How to use checksums
7ddd6256c0c6029487aa7bc4f93865c8eebe6e4872ee0208b81681accf0bcfae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / countercheck-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL countercheck-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.4 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
7e31f7b094db0e70ed7c5536c28388111d73ff26b861b2a7ec89dce50cb37d1d
BLAKE2b-256 checksum
How to use checksums
ab469442a0762efa521d3f8b8c155af0b24ed8ad238baee5a079afacbd62a457
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / countercheck-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL countercheck-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.3 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
d2ba18a9e5fa76dcadf44698c2380c250b6cb9fc3744dfc5955498461ccca54b
BLAKE2b-256 checksum
How to use checksums
9ca0a42e53f102fb69672b0e8da4721719f9dc4b3df8391f137b9e2ded8d4b65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / countercheck-0.2.0-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL countercheck-0.2.0-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 2.7 MB
Tags Python 3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5695dc15d1f8509b35d131b594143760784ec8c1d3db6ee9f8806119829c24b8
BLAKE2b-256 checksum
How to use checksums
eb9f05ac60d4866010d847227913d80c76ce1e54290d54d5881d0f8d9658b6d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for countercheck 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for countercheck-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page