OpenKnowledge

Timeline and recovery

Review the edit history for the open document, including agent, human, upstream sync, and file system changes, with inline diffs and version restore.

The timeline shows you the history of edits made to the document you have open. From there you can view or revert to older versions of the document.

What the timeline shows

Open the timeline from the document side panel by clicking the icon. Each entry shows who made the change, when it happened, and a short summary of the change.

Timeline entries include:

  • Agent and human edits with contributor attribution and change summaries
  • Upstream sync entries from Git
  • File system changes made outside of OpenKnowledge
  • Recovered content entries OpenKnowledge saves itself. They hold a version it could not merge into the document, such as the pre-change version when an external file change arrives with no acknowledged base.
  • Before an outside change was merged entries, two per collision, when an outside edit and yours change the same paragraph: one holds your version (Version in OpenKnowledge), the other the outside version (Outside version), as they were before both were kept.
  • Not merged entries when an outside edit cannot be merged safely, or changed a Mermaid, Excalidraw or plain-text file, which OpenKnowledge cannot merge. The entry holds the version that was set aside, labelled Outside version or Version in OpenKnowledge.

Project-wide checkpoints saved by agents via the checkpoint MCP tool do not appear on the timeline; agents find and restore them with the history and restore_version tools.

OpenKnowledge also saves recovery entries itself. When it detects an external file change on its own and has no acknowledged base to merge the change against, the disk version replaces the document and the pre-change version is preserved as a Recovered content entry, which you can restore like any other timeline entry. When an outside edit and the document's open version change the same paragraph, both versions stay in the document, the open version first and the outside version directly under it, nothing is asked, and both earlier versions are saved as entries. When one side deleted a paragraph the other changed, the changed version stays in the document, and both earlier versions are saved as entries. When the two cannot be merged safely, for example a very large file or a merge OpenKnowledge cannot verify, the open version stays and the outside version is saved as an entry. An agent write that meets an outside edit follows the same rules and lands. A Mermaid, Excalidraw or plain-text file that changed outside while you had unsaved edits keeps your version, on screen and on disk, and the outside version is saved as a Not merged entry; with no unsaved edits, the outside version simply replaces what is shown. Global skills and skills opened from outside the project merge outside changes the same way documents do, and their entries are saved in the history of the project that was open at the time. When your settings files change outside OpenKnowledge, a valid change applies and any setting you were still changing is saved to the project's history. A change that is not valid settings is not applied: Settings reports it, and at your next settings save it is saved to the project's history and replaced by your settings. A notice at the top of Settings says which happened. The app cannot show settings history yet; agents can read it with the history tool. OpenKnowledge raises a conflict, and changes nothing until it is resolved, when the file on disk holds Git conflict markers, when it cannot save the outside version to the timeline, when an agent write has no acknowledged version to merge against, or when another app restores an exact older copy over an acknowledged edit (see Conflicts that don't come from Git).

When the project has no history to save to, for example with no shadow repo, the version set aside for a Mermaid, Excalidraw or plain-text file, a skill or a settings file is saved instead under ~/.ok/edit-backups/discarded/, and the notice names the file. A project's file gets a folder inside a folder for that project; a global or external skill gets one folder that every project shares. Each folder keeps its five newest copies. If neither can take the version, or the file keeps changing, cannot be read, or changed to text that is not UTF-8, nothing is saved yet: your edits stay on screen and in the recovery copy, and OpenKnowledge tries again, for a file that is not UTF-8 once it changes. A separate notice says why, beside any notice that a version was kept. It goes away once the save lands, or after a restart that leaves nothing held, and if you dismiss it while the save is still held, it comes back at the next try that fails. For a settings file there is no such notice: Settings says why each time the cause changes.

When another app or a terminal renames or moves the file of an open document, the document stays open under its new name with any typing you have not saved yet, and its timeline and its notice move with it.

When the file of an open document is deleted outside OpenKnowledge, the document stays open while OpenKnowledge re-checks the folder, in case the file was moved rather than deleted. If no moved file turns up, usually within a few seconds and at most about 30 seconds, the delete stands: any unsaved typing is first saved as a Recovered content entry on that document's timeline, then the document closes, and nothing is written back to the deleted path. The entry stays under the document's name: agents can read it with the history tool, and it shows on the timeline again if a document with the same name is created.

A Git branch switch, pull, stash or reset is taken in like any other outside change. Typing you had not saved yet is merged into the new branch's version of each open file, and where both changed the same paragraph, both versions stay in the document and both earlier versions are saved as entries, as described above.

When both versions were kept, or a version was saved to the timeline instead of merged, a notice at the top of that document says what happened. It stays until you dismiss it, unless the document is deleted, the version it names leaves the timeline, or more than 200 newer notices, counted across all branches, push it out. If the document is renamed or moved, in the app or outside it, the notice moves with it. Each branch keeps its own notices. Where the window has a timeline and entries were saved, Open timeline shows them. The notice never asks you to choose a version: restoring an entry is how you go back.

The timeline is not the editor's undo history. Each timeline entry is a snapshot of the whole document, while undo steps back through your own recent edits in the pane where you are working. Agent edits, human edits, and file-system changes are batched into an entry once activity settles. Upstream syncs get their own entry when the sync lands. For when source-mode undo starts fresh, see Editor → Undo in source mode.

The timeline is per branch: it shows the branch's own edits, plus history from before the branch diverged from main. History is stored in a shadow git repo inside your project, so entries and attribution survive app restarts and agent sessions — see Attribution and collaboration.

Review changes

Click a timeline entry to expand it. OpenKnowledge shows an inline diff so you can compare that version with the current document. If that version has the same body as the current document (properties are not part of the diff), you will see No changes.

You can switch between unified and split diff layouts from the toggle at the top of the timeline panel (shown once the timeline has entries).

An expanded timeline entry showing a split diff next to the document, with removed lines highlighted in red and added lines in green

Restore a previous version

Use the restore button on a timeline entry to restore the document to the selected version. Restoring is append-only: OpenKnowledge creates a new change with the old content instead of deleting history.