update

A command for updating Cohort to a newer upstream version and recompiling its installed IDE integrations. It previews changes first and only applies a clean fast-forward update.

In plain words
What is it for?
Previewing and installing Cohort updates, reinstalling changed dependencies, recompiling IDEs, and optionally checking signed upstream commits.
Why use it?
It shows what will change before updating and avoids overwriting uncommitted or diverged local work.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/askwigconsulting/cohort/update
Clone the repo
git clone --depth 1 https://github.com/askwigconsulting/cohort
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 666 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00017 $0.00666
Opus 5 $0.00009 $0.00333
Sonnet 5 $0.00003 $0.00133
Haiku 4.5 $0.00002 $0.00067

Measured 2d ago against content hash 50facd1ecf9b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

update scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

canonical/commands/update.md · 54 lines

What it actually says

Update this Cohort install to the latest upstream version.

First run cohort update --dry-run to preview the incoming commits and changed artifacts without touching anything. Then run cohort update to fast-forward the clone, reinstall the package if its dependencies changed, and recompile every installed IDE.

Cohort refuses to update a dirty or diverged working tree — commit, stash, or reconcile first. Updates are never silent: nothing changes until you run the command, and only a clean fast-forward is ever applied.

Trust boundary. A fast-forward still runs the pulled commits' build/setup code (pip install -e) and compiles their artifacts, so the residual risk is a compromised upstream: a malicious commit that is nonetheless a valid fast-forward. To gate against it, set require_signed = true under [update] in ~/.cohort/cohort.toml — Cohort then verifies the upstream tip with git verify-commit before merging and refuses (exit 1) unless the commit carries a signature git accepts.

The gate is only as strong as which key you trust, and this is on you to configure: git verify-commit answers "signed by a key my git trusts," not "signed by the Cohort maintainer." For it to mean anything, pin the signer — set gpg.ssh.allowedSignersFile to a file containing only the maintainer's SSH public key (recommended), or import and fully trust their GPG key. Note plain GPG verification passes for any good signature from a key in your keyring regardless of ownertrust, so an unpinned keyring is a weak bar. ~/.cohort/cohort.toml is therefore security-sensitive — it selects the update source and toggles this enforcement; keep it user-owned and not world-writable. The flag is off by default, so the common clone-and-go flow is unchanged.

For a stronger, identity-pinned tier, set signed_by to a list of trusted key fingerprints — the update then additionally requires the tip's signing key to match one you pinned (not merely any key git trusts), and a non-empty signed_by implies require_signed:

[update]
signed_by = ["SHA256:nuK/x67qH8e3I0UWKQQOTG5ggGCHcWrIfbVy810dHto"]

Get an SSH key's fingerprint with ssh-keygen -lf key.pub (the SHA256:… field), or a GPG key's full fingerprint with gpg --fingerprint (a short/long key-id is not enough — pin the whole fingerprint). Give it as a TOML array of strings, on one line or several.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 54 lines · 17 tokens per session scan A 50facd1ecf9b

Subscribe to this mod's changes

update is a command published in the GitHub repository askwigconsulting/cohort (2 stars, last pushed 25d ago), licensed MIT. It adds 17 tokens to every session and 666 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.