> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plannotator.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Local Version History and Plan Diffs

> Compare plan and document revisions in Plannotator and control the local history copies stored on your machine.

Plannotator saves a local version when a plan arrives or a nonempty local file opens in single-file annotation mode. Folder browsers, web URLs, and agent messages do not create document history. If the content matches the latest version, Plannotator reuses that version instead of writing a duplicate.

## Compare revisions

When an earlier version exists, the review UI shows an added and removed line count. Open it to compare the current content with the previous version.

For Markdown, choose between:

* **Rendered**, which marks added, removed, and modified blocks in the rendered document
* **Raw**, which shows a Git-style Markdown diff

You can annotate a changed block in the rendered view. The exported feedback marks it as diff content.

For rendered HTML, **Show changes** displays the current page with inline insertion and deletion highlights. See [Review HTML](/open-source/workflows/html#compare-html-versions).

## Choose an older base version

Open the left sidebar and select the Version Browser. Choose any saved version to use as the comparison base. Plan review and document annotation use the same browser.

## Where history is stored

History lives under:

```text theme={null}
~/.plannotator/history/<project>/<history-key>/
```

Set `PLANNOTATOR_DATA_DIR` to move the whole Plannotator data directory.

Plans are grouped by project, the first Markdown heading, and the date. A revised plan with the same heading on the same day joins the same history. Annotated files are grouped by their file path, so the history stays together when headings or content change.

<Warning>
  Document annotation history stores a copy of each changed file under the Plannotator data directory. Disable it before opening sensitive files if those copies are not acceptable.
</Warning>

## Disable document annotation history

Set the environment variable:

```bash theme={null}
export PLANNOTATOR_ANNOTATE_HISTORY=0
```

Or add this to `~/.plannotator/config.json`:

```json theme={null}
{
  "annotateHistory": false
}
```

The environment variable takes precedence. With annotation history disabled, Plannotator does not write document copies and the document version diff is unavailable. Plan submission history remains part of the plan review flow.

## History and the archive are different

Version history records successive plan and document content for comparisons. The optional plan-save setting records approved or denied decision snapshots separately under `~/.plannotator/plans/`. Run `plannotator archive` to browse those saved decisions in a read-only view.

Last verified against Plannotator OSS v0.23.1 on July 18, 2026. Maintained by the Plannotator project.
