Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Undo a change or restore a client file

For anyone who applied something and wants it back the way it was: a server you just saved, an import, a skill install, or a client file that should be exactly what it was before Surjection wrote it. At the end, the store and your client files are back to the earlier state, and the undo itself is recorded, so you can redo it.

What you can undo

Every change to Surjection's store is a commit, and every apply backs up each client file before writing it. That gives three ways back:

You want toUseWhat changes
Take back an apply (a save, an import, a toggle)Undo this applyThe store goes back to before that apply, and the client files are written again to match
Go back to an earlier version of the store, or of one serverRestore this version or Restore entity...The store, as a new commit; the previous state is tagged first
Put a client file back byte for byteClient file backups, RestoreOnly that file, from the backup taken before the apply

Before you start

  • Find the change: History lists every commit, newest first, with Applied or Partly applied on apply runs. Filter by All, User or Projects, or search for an entity such as server/github.

Steps

Undo the change you just made

Right after you edit or delete something, the notification has Undo this apply. Choose it, and the change is rolled back and applied. After adding a server or installing a skill, the notification offers View instead; undo those from History (below).

The notification after a save: Saved Context7, with an Undo this apply button.

Undo an apply from History

  1. Open History and select the apply, for example "apply: 3 files (omp, claude-code)". Its actions appear under it.

  2. Choose Undo this apply. For the latest apply it runs at once; if later applies changed the same entries, Surjection asks first ("Later applies changed the same entries.", Undo anyway).

    History with the apply "apply: 3 files (omp, claude-code)" selected and its actions, Undo this apply highlighted.

  3. A notification confirms it, for example "Undid apply 01J...". Entries you edited by hand since are not overwritten without asking.

The Pending changes drawer lists recent applies with Undo this apply too.

Restore a client file exactly

  1. In History, open the Client file backups tab. Each apply run lists the files it backed up.

  2. Choose Restore next to one file, or Restore all for the run.

    The Client file backups tab: one apply run with ~/.omp/agent/mcp.json, ~/.claude.json and the project's .mcp.json, each with a Restore button, and Restore all.

  3. The notification says how many files were restored, and each file is marked Restored. A backup that was removed because it held old secret values is reported as Backup removed.

Restoring a file does not change the store. If the file and the store now differ, surject status shows it, and the next apply asks what to do with the file (in the app, Resolve... in Pending changes).

Go back to an earlier version

Select any commit in History and choose Restore this version (the whole store) or Restore entity... (only some servers, skills or settings). The dialog lists what would change; confirm, and apply it when asked. Your current state is tagged auto/pre-restore/... first, so you can return to it.

On the command line

surject history                       # commits, with apply ids
surject rollback last                 # undo this machine's latest apply
surject rollback <APPLY-ID>           # or an older one (asks first; --yes to skip)
surject restore --files <APPLY-ID>    # client files back from that apply's backups
surject restore --files <APPLY-ID> --file ~/.claude.json   # only one file
surject restore <REV> --path server/github --apply         # one server from an earlier commit

Check that it worked

  • surject status shows the entries as in sync (or lists those that differ after a file restore).
  • surject history shows the rollback or restore as a new commit.
  • Open the client file, or the client's MCP view, and check the server is back (or gone).

Undo the undo

A rollback and a restore are commits too: undo the rollback's own apply the same way, or restore the auto/pre-rollback/... or auto/pre-restore/... tag Surjection made before it.

More detail