{"slug": "show-hn-belay-deterministic-semantic-diffs-of-what-a-coding-agent-changed", "title": "Show HN: Belay – deterministic semantic diffs of what a coding agent changed", "summary": "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.", "body_md": "**Intent:** record what changed on a system, explain it in semantic terms rather than as a path\nlist, and make it reversible.\n\n**Status: pre-alpha.** The checkpoint and diff engine runs (below); the formats it writes are drafts\nthat may still change, and the latest pre-release is v0.1.0-alpha.11. Nothing that changes your files\nexists yet.\n\nTested against 2,115 published agent runs: [results](https://github.com/Allexsen/belay/blob/main/bench/replay/RESULTS.md).\n\n**Pre-alpha. The most useful contribution right now is real-world\nuse.** Run belay around something you actually do (an agent session,\na build, an install) and compare its report with what really\nhappened. If it missed a change, invented one, or buried the real\nchange in noise, open an issue with the receipt. That's the data\nI need the most.\n\n- `belay check` ,`mark` ,`diff` and`log` (see[docs/cli.md](https://github.com/Allexsen/belay/blob/main/docs/cli.md) ): record a directory as a\ncheckpoint, record what changed since the last one, show the difference, list checkpoints. They\nneed no privileges and only read the directory they are given; belay writes only under its own\nstate directory.\n- Interpreters that explain changes to pip installs, dpkg's package database, git refs, hooks,\nreflogs (kept and read in full up to 16 MiB each) and small text files\n([docs/spec/diff-v1.md](https://github.com/Allexsen/belay/blob/main/docs/spec/diff-v1.md) ). Added recently: users and groups\n(`etc/passwd` ,`etc/group` ), sudoers, cron, systemd units and timers, ssh`authorized_keys` , the\ntrust store (`etc/ssl/certs` ), and the keys of nginx, sshd and ini-style configuration files\n([docs/cli.md](https://github.com/Allexsen/belay/blob/main/docs/cli.md#--system-a-whole-machine-by-its-roots) ). They recognise the files by\ntheir paths, in any scope;`--system` is what reads them on a whole machine.\n- `belay baseline export` and`belay verify` : a checkpoint kept as a bundle, and a directory compared\nwith it and judged against a protect spec.\n- `--docker` : a container's layers read from the host.\n- `belay watch` : a running record of a directory while an agent works in it, one line a step, with\nanything in a sensitive place first ([docs/cli.md](https://github.com/Allexsen/belay/blob/main/docs/cli.md#watch-a-running-record-of-a-directory) ,\npinned in[test/expect/watch-v1.md](https://github.com/Allexsen/belay/blob/main/test/expect/watch-v1.md) ); and a[Claude Code plugin](https://github.com/Allexsen/belay/blob/main/claude-plugin/README.md) around it.\n- `belay watch --system` ,**experimental** : the same running record for a whole machine's`/` ,\nread by a list of roots.`watch start --system` takes the first capture,`watch step --system` prints a step's line, and`watch receipt --system` and`watch stop --system` print the receipt in\nsections (installed, services, user, cron, sudo, ...). It is new, slow on large machines, and its\noutput may change ([docs/cli.md](https://github.com/Allexsen/belay/blob/main/docs/cli.md#watch---system) , pinned in[test/expect/watch-system.md](https://github.com/Allexsen/belay/blob/main/test/expect/watch-system.md) ).\n- pybelay, Python bindings around the binary, with a reward helper and an\n[Inspect integration](https://github.com/Allexsen/belay/blob/main/python/README.md#using-belay-with-inspect) . The integration runs belay inside\nthe sample's sandbox, or with`where=\"host\"` on the eval's machine, reading the sample's Docker\ncontainer from outside; that mode needs root for belay.\n- The manifest format, version 5 ([test/expect/manifest-v5.md](https://github.com/Allexsen/belay/blob/main/test/expect/manifest-v5.md) , built on[version 4](https://github.com/Allexsen/belay/blob/main/test/expect/manifest-v4.md) ,[version 2](https://github.com/Allexsen/belay/blob/main/docs/spec/manifest-v2.md) and[version 1](https://github.com/Allexsen/belay/blob/main/docs/spec/manifest-v1.md) ; belay still reads versions 1 to 4) and the diff format\n(diff.v1, a draft).\n- 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.\n\nNo `commit`, `discard`, restore or undo: belay records and explains, and changes nothing. The\nsession engine under `src/session/` (namespaces and overlays) is not part of the `belay` binary.\nNo stable release.\n\nToday belay only records and reports; it contains nothing. The session engine, when it ships, is\nmeant as a **safety** boundary, not a **security** boundary — built for accidents, not for hostile\ncode; it will not contain a process that is actively trying to escape. See [SECURITY.md](https://github.com/Allexsen/belay/blob/main/SECURITY.md).\n\nWhat a checkpoint does not see: anything outside the scope, anything below a mount point inside it,\nbelay's own state directory and the paths you exclude (left out, and named in every manifest), and\nnetwork effects (pushes, API calls, emails).\nOn filesystems with coarse timestamps some same-size rewrites can be missed; the limits are in\n[docs/spec/manifest-v1.md](https://github.com/Allexsen/belay/blob/main/docs/spec/manifest-v1.md). A file being written while it is read is\nmarked and reported unknown where the kernel can say so, and counted where it can't\n([docs/cli.md](https://github.com/Allexsen/belay/blob/main/docs/cli.md#a-file-being-written-while-it-is-read)).\n\n```\nmake check\n```\n\n`make` needs a C11 compiler and GNU make, on Linux or macOS; `make check` also needs python3. The\nbinary is `bin/belay`.\n\nSign-off required (`git commit -s`), no CLA. See [CONTRIBUTING.md](https://github.com/Allexsen/belay/blob/main/CONTRIBUTING.md).\n\nApache-2.0. **The core stays Apache-2.0, permanently.** If paid offerings ever exist they will be\nseparate products — never features removed from or withheld by this repository.", "url": "https://wpnews.pro/news/show-hn-belay-deterministic-semantic-diffs-of-what-a-coding-agent-changed", "canonical_source": "https://github.com/Allexsen/belay", "published_at": "2026-11-25 12:54:02+00:00", "updated_at": "2026-11-25 13:12:21.337539+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools"], "entities": ["Belay", "pybelay", "Inspect", "Claude Code"], "also_reported_by": [], "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.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-belay-deterministic-semantic-diffs-of-what-a-coding-agent-changed", "markdown": "https://wpnews.pro/news/show-hn-belay-deterministic-semantic-diffs-of-what-a-coding-agent-changed.md", "text": "https://wpnews.pro/news/show-hn-belay-deterministic-semantic-diffs-of-what-a-coding-agent-changed.txt", "jsonld": "https://wpnews.pro/news/show-hn-belay-deterministic-semantic-diffs-of-what-a-coding-agent-changed.jsonld"}}