agentStack

These pages describe v0.19.0, the current release. That is the build the installer gives you. agentstack --version says which build you have.

Undo AgentStack changes

Start with the simple timeline:

bash
$ agentstack undo

It shows recent AgentStack-managed writes and the exact command for returning to a point. Nothing changes until you add the shown --write form.

console
recent changes (newest first)
  this project only — machine-wide writes: agentstack more restore --list
  1  1m ago       init                                         7 files · Claude Code, Codex CLI

  pick a point: agentstack undo --to <n> --write

undo is scoped to this project, and that is deliberate. The ledger is machine-global, so undo filters it to writes that landed inside the directory you are standing in — offering another repository's applies would be offering to break a project you are not looking at. A machine-scope write is therefore recorded but not listed here: agentstack more gateway connect --all --write registers the bridge in each harness's own config, and apply --scope global writes outside the project too. Both are undoable, through more restore below, which lists everything this machine recorded.

Undo one recorded write#

The script-friendly form is:

bash
$ agentstack more restore
$ agentstack more restore --last --write
$ agentstack more restore <id> --write

The bare form lists every recorded point and every adapter backup:

console
$ agentstack more restore
Recorded changes (newest first) — everything on this machine:

  18cb1a4c48  1m ago   global   gateway connect            2 files · Claude Code, Codex CLI
  18cb1a4c46  1m ago   project  init                       7 files · Claude Code, Codex CLI

Undo one with: agentstack more restore <id> --write (or --last for the newest)

Adapter config backups (content before our last write):
  Claude Code    global ~/.claude.json
  Codex CLI      global ~/.codex/config.toml

Restore one with: agentstack more restore <adapter> [--scope project] --write

Restore covers managed config-file writes such as settings, hooks, instructions, and rendered server configuration. The revert is itself recorded, so going one step too far remains recoverable.

Remove legacy rendered configuration#

When the gateway now serves MCP servers live but older native entries remain:

bash
$ agentstack more unrender
$ agentstack more unrender --write
$ agentstack doctor

It removes only entries AgentStack owns. User entries remain.

Remove this project's rendered setup#

bash
$ agentstack more uninstall --scope project --keep-home
$ agentstack more uninstall --scope project --keep-home --write
$ agentstack doctor

--keep-home preserves the central library, trust store, audit, and undo history. The project manifest and lock remain, so the setup can be rebuilt.

AgentStack removes empty parent directories left by its managed skill delivery. It preserves non-empty folders and any user-owned files. This cleanup uses directory-empty semantics; it never recursively deletes an unknown provider tree.

Remove everything AgentStack manages on this machine#

bash
$ agentstack more uninstall
$ agentstack more uninstall --write

Without --keep-home, this also removes AgentStack's machine state after removing managed provider entries. Preview carefully: the deleted trust store, audit history, and local library state are not recoverable from the undo ledger once that ledger is gone. A Git-backed central library remains recoverable from its remote.

What undo cannot restore#

AgentStack can reverse its own recorded configuration writes. It cannot restore a file an MCP server deleted, an arbitrary manual manifest edit, or another program's change. Use Git or that program's recovery mechanism for those.

Removal is never blocked by stale trust. You do not need to approve a project to make it inert.

Next: Troubleshooting · See what happened · Reference

Source of truth: docs/howto/undo.md — this page is generated from it.