Documentation

Updating

How to find out which build of countersign a machine has, how to bring it up to date, and what an old build can and cannot do.

The short version

countersign version     # which build this is, and whether there is a newer one
countersign update      # fetch the newest build, check it, install it

Nothing updates by itself. A build changes only when someone runs countersign update, the install line, or the rollout script.

Which build is this

countersign version

It prints the build, the platform and where the program is, then asks the place it was installed from whether there is a newer one. --offline skips the check.

A build is named by its date, with a number after it when there is more than one in a day: 2026.11.25.2 is newer than 2026.11.25 and older than 2026.11.26.

Builds from before 2026.11.25.2 have no version command. If countersign version answers unknown command, the build is older than that. Update it with the install line (see below).

You also see it without asking:

  • Commands you run yourself, such as countersign log or countersign agent list, end with one line on the error stream when the service is on a newer build: A newer countersign is available. Commands that an agent or a program runs (hook, mcp, gateway, ask, statusline) never print it.
  • Each ask a hook or a gateway sends carries a cli fact with its build. In the console, an agent's page shows the build its machine last asked with, marked Behind when a newer one exists. A build too old to say is shown as not reported.

Update one machine

countersign update

What it does, in order:

  1. Asks where it was installed from which build is on offer. If this one is not older, it stops.
  2. Checks that it can replace the program. If it cannot, it stops before downloading anything.
  3. Downloads the build for this system and its published SHA-256, and compares them. A download that does not match is thrown away and nothing changes.
  4. Runs the new program once to see that it starts on this machine.
  5. Swaps it in with one rename, so an update that is interrupted leaves the old program in place.
  6. If the engine on this machine is running (after countersign start), stops it. It starts again on the new build the next time it is used.

Hook files, gateways, credentials, the signing key and the ledger are not touched. An agent uses the new build from its next tool call.

FlagMeaning
--checkSay whether there is a newer build and change nothing.
--from URLFetch from this address instead. It must be https, unless it is this machine.
--forceInstall the build on offer even when it is not newer.

Where it fetches from. In this order: --from, the COUNTERSIGN_UPDATE_URL environment variable, the address the install script recorded in ~/.countersign/origin, the engine in ~/.countersign/config.json when that is not the one on this machine, and last the hosted service at https://app.trycountersign.ai. If you run your own engine, its builds come from the folder you gave serve --dist.

If the build has no update command, run the install line again. It does the same download and checksum check and replaces the program:

curl -fsSL https://app.trycountersign.ai/install.sh | sh

Update a rollout

A machine set up by a rollout script has the program in /usr/local/bin, owned by root. countersign update run by the user stops at step 2 and says so.

Run the rollout script again as root, by hand or through device management. It downloads the current build, checks it and installs it. It does not enrol the machine again and does not touch the copy it made of the original hook files. Or run sudo /usr/local/bin/countersign update --from https://app.trycountersign.ai.

What an old build can and cannot do

It keeps asking. A hook, a gateway or an SDK on an old build goes on asking and being answered. The service never turns an agent away for being out of date.

An old build fails where it meets something added after it was made:

WhatWith a build older than 2026.11.25.2
countersign verify on a pack that holds a decline, a review, a labelled rule or a passport with a business owner or risk tierFails, because the old verifier refuses entries and fields it does not know. Update and verify again. From 2026.11.25.2 the failure says this may be the reason.
Enrolling under a rollout that sets a business owner or risk tierRefused, with a message that the rollout needs a newer build.
countersign agent amend on a passport that has a business owner or risk tierRefused, because the old build would remove them without being asked to. Update, or make the change in the console.
WhatWith a build older than 2026.11.29.1
countersign export from the hosted service, when the pack is over 3 MB (about 3,400 entries)Told to update. The old tool asked for each part of the pack afresh and was given a different pack for each, so the download gave up and said the ledger kept growing.
countersign verify on a pack of more than 131,072 entriesFails with "pack is not readable". Update and verify again.

From 2026.11.25.2 on, every request the tool makes for you says which build it is. If a later release cannot work with a build at all, the service answers that build's operator commands with "too old for this service" and the command to run. Asking, reporting an outcome and the downloads stay open, so an agent keeps working and the machine can still update.

Builds before 2026.11.27.3

Build 2026.11.27.3 changed the hash every ledger uses, from BLAKE3 to SHA-256, and the way the engine makes its keys. It was done before the service had customers, and nothing was carried over. A ledger written by an older build cannot be opened or verified by this build or any later one.

What that means for a machine that used an older build:

  • A workspace kept on the machine itself (countersign start with no account) does not open after the update. The engine on the machine will not start, and its log says the root seed does not match. The seed is not wrong: the old ledger is the cause. To start again, run countersign stop, move ~/.countersign somewhere else, and run countersign start. The old ledger stays in the folder you moved, and only the old build can read it.
  • An evidence pack exported by an older build is in a format no build from 2026.11.27.3 on reads. From build 2026.11.29.2 the verifier says so in those words, and no longer reports the pack as failing a check. Only a build older than 2026.11.27.3 can verify such a pack, and countersign update replaces the program in place, so that program is gone from a machine that has updated. This was the one time a format was dropped, and it was before the service had customers. See How long a pack stays readable for what holds from here on.
  • A machine connected to the hosted service needs the update and nothing else. The hosted service started again with empty ledgers on this build, so each agent is connected again from the console.
  • An engine you run yourself on a database will not start on the old database. Give this build a new, empty one.

For whoever runs the engine

  • The engine and the tool are one program. The engine's build is the newest build it hands out. GET /v1/info returns it as cli_build, and every response carries it in the Countersign-Latest header.
  • When you deploy a new engine, publish the builds under /dl and the browser verifier with it. An engine newer than its downloads tells people to update to a build they cannot fetch.
  • The build name is Build in core/version.go. Change it in every release that changes the command-line tool. MinCLI in the same file is the oldest build still served. It is 2026.11.27.3: a tool older than that reads a receipt from a newer engine as broken, so it is told to run countersign update instead.

What has been checked

sh sdk/tests/update.sh builds a copy that believes it is from 2020 and runs it against a real engine on this machine: version and update --check report the newer build and change nothing, a download with a wrong checksum is refused and leaves no partial file, plain http is refused, the update replaces the program with the published one byte for byte, and a second update finds nothing to do.

Not checked: update on Linux, on a program in a root-owned folder, against the hosted service, and with the engine on the machine running.