Restore a hooks file version

Every change DataMind Oda or Settings makes to a hooks file keeps a version, so you can compare a change with what the file held before and put an older version back. This page covers the History dialog in Settings > Hooks: the version list, viewing and comparing a version, and restoring one.

The Hooks settings are part of the desktop app and the VS Code extension; the web app does not show them. Hooks covers the section itself, and Hook runs and changes in chat covers what a hook write leaves in a chat.

Open a file's versions

  1. In Settings > Hooks, find the file: your own file is under Your hooks, and a project's file is inside the folder's group.
  2. Choose History on the file's row.
  3. The dialog Versions of {file} opens with the saved versions, newest first.

What the version list shows

The label names what saved the version; the five labels are:

LabelWhat saved that version
From a chatA change written from a chat, for example when Oda created or changed a hook for you.
From SettingsA change written from Settings, for example when Open file created your file.
RestoredA restore put this version back.
Edited outside the appThe file changed outside DataMind Oda, and that edit is kept too.
First version seenThe first text of the file Oda saw.

The newest ten versions are kept for each file, and the oldest drop out as new ones are saved.

View and compare a version

  1. Choose View on a row.
  2. The version opens with a line showing when it was saved and its facts. When it differs from the file as it is now, the changes show as a diff: what a restore would replace and what it would bring back. When the text is the same, it shows plainly.
  3. A diff longer than 120 lines folds its middle away behind … {count} more lines; choose it to show the whole diff, and Collapse to fold it back. Copy puts the diff on the clipboard and becomes Copied.
  4. Nothing is written while you view. Back returns to the list, and Close closes the dialog; a version that is not the current one also offers Restore here.

Restore an earlier version

  1. Find the version in the list, or open it with View.
  2. Choose Restore. While it runs, the dialog's buttons wait.
  3. The dialog returns to the list, reads the versions again, and reports Restored the version from {time}. The restored version is now the file's text, tagged Current and labelled Restored.

When the versions cannot be read

Questions, answered

Where do I find a hooks file's saved versions?

In Settings > Hooks, choose History on the file's row; a project's file sits inside its folder's group. The dialog lists the saved versions, newest first.

Why does a file have no History button?

The button is on the files DataMind Oda writes; a Claude Code file is written by Claude Code, so no versions exist for it. Edit a Claude Code file in the tool that owns it.

When is a version saved?

Each time DataMind Oda or Settings changes the file. The first text Oda saw of a file is kept as First version seen, and a change made outside the app is kept as Edited outside the app.

What does the label on a version mean?

It names what saved that version: a chat, Settings, a restore, an edit made outside the app, or the first text Oda saw of the file. The table above pairs each label with its meaning.

Can I view an older version without restoring it?

Yes. View only reads the version; nothing is written until you choose Restore. Back returns to the list.

How do I go back to an earlier version of a hooks file?

Find it in the list and choose Restore, or open it with View and choose Restore; the dialog confirms with Restored the version from {time}.

Why is Restore missing on the version marked Current?

The current version already matches the file, so there is nothing to put back on that row. Open another version to get its Restore.

I restored the wrong version. Can I undo it?

Yes. A restore keeps the state it replaced, so the version that was current before is still in the list; restore it the same way.

Why is an older version no longer in the list?

The newest ten versions are kept for each file: as new ones are saved, the oldest drop out. If an old state matters to you, restore it while it is still listed.

Does restoring a version stop a folder's hooks?

For a project's file, yes: a restore changes the folder's hooks, so the folder reads Changed since you trusted them and its hooks are withheld until you trust it again (Trust a folder's hooks). Your own file is not trusted, so nothing is withheld there.

What if the versions fail to load?

The dialog reports Could not load the hooks: {message}, with the reason after the colon. Close the dialog and open History again; if the message returns, keep it for your DataMind OS administrator.