autonomy-upgrade

A command that updates an existing autonomy-loop installation to its current configuration format. It adds missing settings while preserving values you already chose.

In plain words
What is it for?
It is for migrating an existing installation, temporarily unlocking its protected configuration, applying the update, and protecting it again.
Why use it?
It lets you apply plugin updates without replacing your configuration or resetting the loop's handoff state.

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/inferencegod/autonomy-loop/autonomy-upgrade
Clone the repo
git clone --depth 1 https://github.com/inferencegod/autonomy-loop
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,565 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.00023 $0.02565
Opus 5 $0.00012 $0.01282
Sonnet 5 $0.00005 $0.00513
Haiku 4.5 $0.00002 $0.00257

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

Security

Grade A, and why

autonomy-upgrade 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 yesterday.

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.

autonomy-loop/commands/autonomy-upgrade.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Bring THIS repo's loop up to date after you have updated the plugin. This is the one thing to run when you move to a new version. It is safe to run any time: it only ADDS missing knobs with sane defaults, never changes a value you set, and never resets the baton.

The full sequence is UNLOCK -> MIGRATE -> RE-LOCK: a hardened v0.8 install locks autonomy.config.json read-only (it is one of the protectedPaths), so the migrate hooks below cannot rewrite it until it is unlocked, and we re-lock it afterward so the control plane is protected again. Run the steps in order.

  1. UNLOCK the control plane so the migration can write the config. Run node ${CLAUDE_PLUGIN_ROOT}/hooks/harden-control-plane.mjs --unlock from the repo root. This walks the same targets the lockdown protects (protectedPaths + the plugin hooks/ dir) and makes them writable again (POSIX: chattr -i then chmod u+w; Windows: removes the deny ACE). It is best-effort and never aborts the upgrade: it prints a per-target result. If a target reports FAIL, it was chown'd to a non-agent OWNER (the durable barrier) and chattr -i needs THAT owner: have the owner run chattr -i <path> && chmod u+w <path> (or adjust ownership) for each FAIL, then re-run this step. On a fresh, never-hardened install nothing is locked and every target reports OK as a no-op. After this, the config is writable and the migrate hooks can run.

  2. Run node ${CLAUDE_PLUGIN_ROOT}/hooks/migrate-config.mjs from the repo root. It tops up autonomy.config.json (the breaker block, gate.selfMutate, and the self-protecting protectedPaths entries) and LOOP-STATE.md (epoch, no-progress-epochs, last-tree-sha), writing back only what was missing. If autonomy.config.json is not valid JSON it refuses to touch it and tells you to fix it first.

  3. Report exactly what it added, or that everything was already current.

2b. ADDITIVE v0.7.0 + roles migration. SIMPLEST and REQUIRED under v0.8: run the trusted hook node ${CLAUDE_PLUGIN_ROOT}/hooks/migrate-roles.mjs from the repo root. It does the whole roles + v0.7.0 migration in ONE gate-allowed write: it migrates the legacy {research, planner} booleans to the à la carte auto|off|required shape (legacy true -> auto, false -> off, absent -> the presence-driven auto default), and tops up coordination / subagent / convergence / scope / speed plus the rigor routers (gate.verifyGate: "govern", gate.requireProdProtection: true) at the example-config defaults, only-if-missing, idempotent, never resetting the baton. Report what it added. Do NOT use an inline node -e write to autonomy.config.json: the v0.8 gate-guard blocks an interpreter write to the locked control plane (Ring 1), so the hook is the only path that works. (The detailed migrateRoles(cfg) description below documents the same transform the hook performs.) This runs AFTER step 1's migrate-config.mjs and reuses the same top-up-only convention; it only ADDS missing keys and never changes a value I set. Apply the à la carte roles transform with hooks/migrate-roles.mjs migrateRoles(cfg): read the repo's autonomy.config.json, and if isMigrated(cfg) is false, transform the old {research, planner} boolean roles block into the à la carte shape { builder: "auto", reviewer: "required", planner: "off", researcher: "off" } (legacy true maps to "auto", legacy false to "off", so a deliberate disable is preserved; an absent planner/researcher defaults to "off" to reproduce current behavior), and top up the lease, safety, and rigor gate blocks at their safe defaults. It is pure and idempotent: a config already in the new shape is left byte-identical, and it NEVER touches LOOP-STATE.md turn: (the baton). Do this transform by running the hooks/migrate-roles.mjs HOOK (step 2b above): that is the ONLY working path, because the v0.8 gate-guard blocks an interpreter write to the locked control plane (Ring 1), so an inline node -e write to autonomy.config.json is refused. The hook performs exactly the migrateRoles(cfg) transform documented here. Then top up the remaining new 0.7.0 keys at their safe, behavior-preserving defaults ONLY if missing (never overwrite): coordination ({ mode: "multi-process" }, the unchanged default), safety.reducedTrustOptIn (false), subagent ({ reviewerIsolated: true }, inert unless single-cli is later chosen), convergence ({ maxAttemptsPerTask: 5, oscillationK: 2 }), scope ({ maxFiles: 0, maxLines: 0, maxNewPublicSymbols: 0, warnRatio: 0.8 }, all 0 = OFF so no ceiling is enforced), speed (the terminal opt-out block; rigor gates stay ON by default), and gate.verifyGate ("govern", rigor-on DEFAULT: the fifth-gate bite router governs the verify verdict and is fail-closed; this matches what hooks/migrate-roles.mjs sets and the reviewer's default). Report each key added, or that everything was already current. Defaults above reproduce current behavior exactly.

Read the full file on GitHub · 107 lines

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. yesterday First seen · 107 lines · 23 tokens per session scan A 2e2b06da7c61

Subscribe to this mod's changes

autonomy-upgrade is a command published in the GitHub repository inferencegod/autonomy-loop (1 stars, last pushed 2mo ago), licensed MIT. It adds 23 tokens to every session and 2,565 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.