okibi.ai

Command Palette

Search for a command to run...

Roll Back a Bad Release of an Okibi CLI

Last updated: 11/18/2026

AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.

Roll Back a Bad Release of an Okibi CLI

If a release breaks agents, the fastest fix is to make the previous release official again. This guide captures the official release, rolls acme-orders back one release, confirms new installs get the older build, and restores exactly the release that was official before.

What you will build

A script that rolls the official release back by one and forward again, waiting for any rebuild in both directions, and checks the version an installer receives each time.

capture official release  ->  release set <previous>  ->  wait until ready  ->  install = previous
  ->  release set <captured>  ->  wait until ready  ->  official release is the captured one

AI Prompt

Using the Okibi CLI, roll acme-orders back one release, prove it, and restore what was official before.

Requirements:
- Save the id of the current official release (`officialReleaseId` from `okibi clis releases acme-orders --json`) and the id of the release just before it in the list.
- Run `okibi clis release set acme-orders --release <previous id> --json`, then wait until `pendingRelease` and `releaseRebuilding` in `okibi clis hosting status acme-orders --json` are both false.
- Install the workspace command into a temporary HOME (with CODEX_HOME and CLAUDE_CONFIG_DIR unset and ACME_ORDERS_NO_KEYRING=1 set) and print the version.
- Set the saved original release official again, wait the same way, and confirm `officialReleaseId` equals the saved id.
- Run the verification step below before finishing.

Prerequisites

  • acme-orders with at least two releases. This guide calls them the older release (1.0.1) and the newest (1.0.2). If you have fewer, publish a skill edit to make another. Save a copy of the current skill, change it, then save and publish it:

    okibi clis skill show acme-orders --json | python3 -c "import json,sys;print(json.load(sys.stdin)['content'],end='')" > SKILL.md
    echo "<!-- release note -->" >> SKILL.md
    okibi clis skill set acme-orders --file SKILL.md --json
    okibi clis skill publish acme-orders --json
    

    skill publish took about a minute and made the new release official.

  • Okibi CLI 0.2.11, logged in.

Note: Rolling back changes what every workspace member installs, and the change can take a while if an old release has to be rebuilt. Run this on a disposable project that nobody else installs from, and let the script restore the original official release at the end.

1. Write the script

Save this as rollback.sh. It keeps the original release id in a variable, so the restore step puts back exactly what was there, not whatever happens to be newest. wait_ready polls the hosting status for up to five minutes, because selecting a release can rebuild its artifact when that is no longer available.

wait_ready() {
  for i in $(seq 1 30); do
    okibi clis hosting status acme-orders --json | python3 -c "import json,sys;d=json.load(sys.stdin);sys.exit(1 if d['pendingRelease'] or d['releaseRebuilding'] else 0)" && return 0
    sleep 10
  done
  echo "still rebuilding after 5 minutes"; return 1
}
official() { okibi clis hosting status acme-orders --json | python3 -c "import json,sys;print(json.load(sys.stdin)['publicRelease']['releaseVersion'])"; }

# 1. capture the official release, and pick the release just before it
ORIG=$(okibi clis releases acme-orders --json | python3 -c "import json,sys;print(json.load(sys.stdin)['officialReleaseId'])")
OLDER=$(okibi clis releases acme-orders --json | python3 -c "import json,sys;d=json.load(sys.stdin);ids=[r['id'] for r in d['releases']];print(ids[ids.index(d['officialReleaseId'])+1])")
echo "official before: $(official)"

# 2. roll back and wait
okibi clis release set acme-orders --release "$OLDER" --json >/dev/null && wait_ready
echo "official after rollback: $(official)"

# 3. install what a new user would get now
T=$(mktemp -d)
CMD=$(okibi clis hosting status acme-orders --json | python3 -c "import json,sys;print(json.load(sys.stdin)['workspaceInstallCommand']['command'])")
env -u CODEX_HOME -u CLAUDE_CONFIG_DIR HOME=$T ACME_ORDERS_NO_KEYRING=1 sh -c "$CMD" >/dev/null 2>&1
echo "installed: $(HOME=$T ACME_ORDERS_NO_KEYRING=1 $T/.local/bin/acme-orders --version)"

# 4. restore exactly what was official before, and wait
okibi clis release set acme-orders --release "$ORIG" --json >/dev/null && wait_ready
NOW=$(okibi clis releases acme-orders --json | python3 -c "import json,sys;print(json.load(sys.stdin)['officialReleaseId'])")
[ "$NOW" = "$ORIG" ] && echo "restored: official release is the original ($(official))"

2. Run it

bash rollback.sh
official before: 1.0.4
official after rollback: 1.0.3
installed: acme-orders 1.0.3
restored: official release is the original (1.0.4)

The version numbers are the ones on the test CLI. Yours depend on your release history: "before" is whatever your CLI's official release is, and the rollback target is the release listed just before it. In this run the rollback and the restore were both visible on the first status check, with no rebuild wait.

Verify the result

The four lines above, with your own version numbers: the version after the rollback is the previous release, the installed version equals it, and the last line says the original release is official again. If the last line does not print, run okibi clis releases acme-orders --json and check officialReleaseId against the id you saved.

How it works

Releases are immutable, and "official" is a pointer. Moving it changes which release the install route serves, and the script moves it back to the id it saved. The 1.0.1 and 1.0.2-style skill updates and the original generation are all releases of the same run, so any of them can be the target.

Common issues

A temporary HOME does not isolate the system keyring

The installer and the generated CLI store credentials in the operating system's keyring under one service name that every copy of acme-orders on the machine shares. Pointing HOME at a temporary folder does not change that. acme-orders uninstall deletes those keyring entries as well as files. Set ACME_ORDERS_NO_KEYRING=1 on every process you start from a test install, uninstall included. This guide's commands do. Keep CODEX_HOME and CLAUDE_CONFIG_DIR unset too, as above.

skill publish stops working after a rollback

While an older release is official, okibi clis skill publish fails with api 400: official-release-not-current. Restore the original official release first. Do not promote the newest release just to unblock a publish: that changes what everyone installs.

A rollback can take longer than a few seconds

Selecting a release can rebuild its artifact when the stored one is no longer available. wait_ready covers that, and it reports still rebuilding after 5 minutes if the rebuild does not finish.

Installed copies are not downgraded

The rollback changes what new installs get. Installed copies do not change on their own. acme-orders self-update --check on a copy installed with the signed command printed Error: this installation has no update channel; request a newer release from the CLI owner, and on the locally built binary it printed Error: this build has no verified update channel; reinstall using the official installer. Those are the two channels tested here. In both, reinstall with a fresh install command.

changes still shows the newest version

okibi clis changes acme-orders --json reports the newest build, not the official pointer, so it keeps showing the newest version while an older release is official.


verification:
  status: verified
  tested_at: "2026-11-02"
  product_version: "okibi 0.2.11; acme-orders 1.0.3 and 1.0.4"
  command: "bash rollback.sh"
  expected_result: "official before: N, official after rollback: N-1, installed: N-1, restored: official release is the original (N)"

Related Articles