cd /news/ai-agents/show-hn-belay-deterministic-semantic… · home › topics › ai-agents › article
[ARTICLE · art-176097] src=github.com ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Show HN: Belay – deterministic semantic diffs of what a coding agent changed

A developer released Belay v0.1.0-alpha.11, a pre-alpha tool that records what a coding agent changed on a system as deterministic semantic diffs and explains the changes in terms of intent rather than path lists, tested against 2,115 published agent runs. Belay offers check, mark, diff and log commands that read only the directory given and write only under their own state directory, with interpreters covering pip installs, dpkg's package database, git refs and reflogs (up to 16 MiB each), users and groups, sudoers, cron, systemd units and timers, ssh authorized_keys, the trust store and nginx, sshd and ini-style config keys. The tool records and explains changes but does not yet commit, discard, restore or undo them, and its author is asking for real-world use reports to find missed, invented or noisy changes.

key takeaway

Belay v0.1.0-alpha.11 records directory checkpoints and emits semantic diffs of agent changes across pip, dpkg, git refs and reflogs up to 16 MiB, plus system files like passwd, sudoers, cron and systemd units, without modifying the files it inspects.

read4 min views2 publishedNov 25, 2026
Show HN: Belay – deterministic semantic diffs of what a coding agent changed
Image: Michielbdejong (auto-discovered)

Intent: record what changed on a system, explain it in semantic terms rather than as a path list, and make it reversible.

Status: pre-alpha. The checkpoint and diff engine runs (below); the formats it writes are drafts that may still change, and the latest pre-release is v0.1.0-alpha.11. Nothing that changes your files exists yet.

Tested against 2,115 published agent runs: results.

Pre-alpha. The most useful contribution right now is real-world use. Run belay around something you actually do (an agent session, a build, an install) and compare its report with what really happened. If it missed a change, invented one, or buried the real change in noise, open an issue with the receipt. That's the data I need the most.

  • belay check ,mark ,diff andlog (seedocs/cli.md ): record a directory as a checkpoint, record what changed since the last one, show the difference, list checkpoints. They need no privileges and only read the directory they are given; belay writes only under its own state directory.
  • Interpreters that explain changes to pip installs, dpkg's package database, git refs, hooks, reflogs (kept and read in full up to 16 MiB each) and small text files (docs/spec/diff-v1.md ). Added recently: users and groups (etc/passwd ,etc/group ), sudoers, cron, systemd units and timers, sshauthorized_keys , the trust store (etc/ssl/certs ), and the keys of nginx, sshd and ini-style configuration files (docs/cli.md ). They recognise the files by their paths, in any scope;--system is what reads them on a whole machine.
  • belay baseline export andbelay verify : a checkpoint kept as a bundle, and a directory compared with it and judged against a protect spec.
  • --docker : a container's layers read from the host.
  • belay watch : a running record of a directory while an agent works in it, one line a step, with anything in a sensitive place first (docs/cli.md , pinned intest/expect/watch-v1.md ); and aClaude Code plugin around it.
  • belay watch --system ,experimental : the same running record for a whole machine's/ , read by a list of roots.watch start --system takes the first capture,watch step --system prints a step's line, andwatch receipt --system andwatch stop --system print the receipt in sections (installed, services, user, cron, sudo, ...). It is new, slow on large machines, and its output may change (docs/cli.md , pinned intest/expect/watch-system.md ).
  • pybelay, Python bindings around the binary, with a reward helper and an Inspect integration . The integration runs belay inside the sample's sandbox, or withwhere="host" on the eval's machine, reading the sample's Docker container from outside; that mode needs root for belay.
  • The manifest format, version 5 (test/expect/manifest-v5.md , built onversion 4 ,version 2 andversion 1 ; belay still reads versions 1 to 4) and the diff format (diff.v1, a draft).
  • Tests on Linux (x86_64, arm64), on macOS 15 or later (Apple silicon), and inside a Docker container as an unprivileged user, in CI on every change.

No commit, discard, restore or undo: belay records and explains, and changes nothing. The session engine under src/session/ (namespaces and overlays) is not part of the belay binary. No stable release.

Today belay only records and reports; it contains nothing. The session engine, when it ships, is meant as a safety boundary, not a security boundary — built for accidents, not for hostile code; it will not contain a process that is actively trying to escape. See SECURITY.md.

What a checkpoint does not see: anything outside the scope, anything below a mount point inside it, belay's own state directory and the paths you exclude (left out, and named in every manifest), and network effects (pushes, API calls, emails). On filesystems with coarse timestamps some same-size rewrites can be missed; the limits are in docs/spec/manifest-v1.md. A file being written while it is read is marked and reported unknown where the kernel can say so, and counted where it can't (docs/cli.md).

make check

make needs a C11 compiler and GNU make, on Linux or macOS; make check also needs python3. The binary is bin/belay.

Sign-off required (git commit -s), no CLA. See CONTRIBUTING.md.

Apache-2.0. The core stays Apache-2.0, permanently. If paid offerings ever exist they will be separate products — never features removed from or withheld by this repository.

── more in #ai-agents 4 stories · sorted by recency
── more on @belay 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-belay-determ…] indexed:0 read:4min 2026-11-25 · —