History and undo
On this page
Every change an agent makes goes into the history with the agent, the time and the machine. You read the history and undo changes from your own terminal.
notegraph log mac-studio 2 changes sync 1m ago ─── Wed 15 Oct 2026 ─────────────────────────────── 09:20 YOU revert reading-list.md +1 -2 > 09:14 AGENT claude-code edit reading-list.md +2 -1 [REVERTED] @@ -3,3 +3,4 @@ ## To read - - The Pragmatic Programmer + - The Pragmatic Programmer [[engineering]] + - A Philosophy of Software Design [[engineering]] j/k move / filter r revert ? help q quit
See changes#
notegraph log
In a terminal, log opens a view of the changes, newest first. Each row shows the time, who made the
change (AGENT with the client name, YOU, IMPORT or MERGE), the
machine, the operation, the note and the lines added and removed. The detail pane shows the diff. When the output goes
to a pipe, log prints plain text. --json prints the changes as JSON, and --diff
adds a diff under each change.
Filter with flags or, inside the view, with the / key:
| Flag | Filter token | Shows |
|---|---|---|
--note <path> | note: | changes to one note |
--actor <actor> | actor: | user, import or agent:<name> |
--device <name> | device: | changes from one machine |
--session <id> | session: | the changes of one agent session |
--since <time> | since: | changes after a time |
--until <time> | until: | changes before a time |
A time is a length of time back from now, such as 30m, 2h, 7d or
1w, or a date such as 2026-10-15. Times are in UTC.
| Key | Does |
|---|---|
j / k | move down and up |
Enter, Tab | go to the diff, and back |
n / p | next and previous hunk of the diff |
/ | filter |
c | clear the filter |
s | show only the session of the selected change |
v | open the note |
r | revert the selected change |
R | revert the whole session of the selected change |
? | help |
q | quit |
Read an old version#
notegraph show projects/alpha.md --at 2d
show prints a note as it is now, or as it was at a time (--at 2d, --at 2026-10-15)
or right after a change (--at <change id>). --json prints the text and the change
ID. --raw writes the exact bytes of the note to a file or a pipe, and refuses to write to a terminal.
Undo a change#
notegraph revert 01M6WN9G3X8G1BK7VAW530NB3H
Every note the change touched goes back to its state before that change. The revert applies at once and records a
new change by you. Find the change ID in the first column of notegraph log when it prints plain text,
in log --json, or in the detail pane of the view. In the view, press r instead.
Undo an agent session#
notegraph revert --session 01M6WN9G3B --dry-run
A session is everything one agent connection did. revert --session <id> takes the full session ID
or at least 10 characters of it. revert --actor agent:<name> --since 2h takes an agent and a
time range instead; --until ends the range. --dry-run prints the plan and writes nothing;
add --json for the plan as JSON. Without it, revert shows the plan and asks you to press
y.
A note that a later change by another session also touched is skipped, and the plan says so. Add
--include-later to undo those later changes too. In the log view, press R.
Edit in your editor#
notegraph open projects/alpha.md
open opens the note in $VISUAL, or $EDITOR, or vi. When you save
and quit, notegraph records the edit as a change by you. If the note changed while you edited it, notegraph keeps both
edits.