Use Lookout
Checkpoints and changes
Lookout records the chat's folder before every turn, so you can review what the agent changed and put files back.
Before every turn, Lookout records the files in the chat's folder: a checkpoint. From it you can see what the agent changed, put one file or all of them back, and undo a revert. Checkpoints need git installed. Lookout keeps them in its own data folder, apart from your repository: taking one never changes your branches, your history or what you staged.
Review changes
- Under a reply whose turn changed files, choose Review changes. When the agent edited files with its file tools, the turn also ends with a card such as 2 files changed, each file counted from the turn's start to its end as This turn counts it: choose Review, or a file to open its diff.
- Or press ⇧⌘R (the top bar's Show panel button) to open the side pane, and choose Changes.
- Choose what to compare in the menu at the top of the pane:
| Choice | Shows |
|---|---|
| This turn | what one turn changed, from its start to its end; an older turn's Review changes button opens that turn |
| This chat | every change since the chat's first turn, up to the files on disk now |
| Uncommitted | the folder against its last commit, new files included (the folder must be in a git repository) |
Changes include edits made by shell commands and by you, not only the agent's file tools. Files that .gitignore,
.lookoutignore, .cursorignore or git's own exclude settings ignore are left out, unless git tracks the file or the
agent wrote it with a file tool.
Where checkpoints don't reach, in a git repository inside the chat's folder or a folder left out for size, the list has only what the agent's file tools changed, marked Outside checkpoint. You can revert those files like any other; what shell commands changed there isn't listed.
J and K move between files, N and P between changes. The ⋯ menu at the top of the pane switches between
Unified and Split, wraps lines, and expands or collapses every file.
When the checkout moves
When the chat's folder is in a git repository and its HEAD moves (a pull, a merge, a switch of branch, a reset or a commit, made by you, another app or the agent's own shell command), what the move changed is not the chat's edit:
- A file that matched the old commit before and matches the new one after is left out of Changes, and a revert or a restore leaves it as the new commit has it. A file the move added or deleted is treated the same way.
- A file both the move and the agent changed shows only the agent's part, measured against the new commit.
- A turn the checkout moved under shows one quiet line, such as The checkout moved from 3e91d0c to a07c5e2 during this turn.
A revert or a restore puts files back; it never moves HEAD or a branch. Once a commit holds an edit, that edit leaves Changes too.
Revert one file
- In Changes, find the file.
- Choose the revert button on its header: Revert and the file's name, or Discard in Uncommitted.
The file goes back at once to how it was at the start of the turn, the start of the chat, or the last commit. A toast offers Undo.
To put back every file in the list, choose Revert all (Discard all in Uncommitted). A dialog lists each file and what happens to it, such as Deleted for a file the agent created, before you confirm.
Restore files to before a turn
- Under the agent's reply, choose Restore files to before this turn. On your own message, the same button reads Restore files to before this message.
- The dialog lists every file that changes. Choose the button that counts them, such as Restore 3 files.
Every change in the folder since that turn started is discarded: later turns' edits, your own edits, and the changes of other chats working in the same folder. Files created since are deleted. Files that Changes leaves out stay as they are, and so does what a checkout move changed. If that went too far, choose Undo.
Edit a message and revert its files
- Click Edit on your message, change it, and click Resend (
⏎). - When files changed from that message on, Lookout asks Revert files to this message? The later messages in the
chat are removed either way.
- Revert files puts the whole folder back to before that message. It has no Undo.
- Keep files (⇧⏎) leaves them as they are.
Undo a revert
Choose Undo in the toast, or in the bar above the list in Changes, which keeps the chat's latest revert or restore.
Undo is refused once one of the files it would put back has changed again, because undoing would overwrite that change.
After a revert, a restore or an undo, the chat shows a row that names the files (Reverted, or Restored for an undo), and the agent is told which files changed so it reads them again before editing.
Limits
- Only turns that changed files show Review changes and Restore files to before this turn. Without git, no turn has them.
- A chat whose folder is your home folder or the root of the disk takes no checkpoints.
.git,.lookout, and dependency folders and caches such asnode_modules,.venvand__pycache__are never recorded.- A git repository inside the chat's folder is not recorded: it keeps its own history. A restore still puts back what the agent's file tools (writes, edits and deletes) changed in it, and in folders left out for size, but not what shell commands changed there.
- When one checkpoint would add more than 50,000 new files or 500 MB, Lookout leaves folders out until the rest fits, and keeps them out of later checkpoints. A new file over 50 MiB is left out on its own. If leaving folders out isn't enough, or listing the folder takes over 30 seconds, checkpoints stop for 30 minutes. Changes shows a note that says what is left out: open a subfolder as the project to record all of it.
- In a folder that is a git repository, or a folder inside one such as a package of a monorepo, the files the repository tracks there don't count toward that limit, so a large repository is recorded whole, and after a pull or a switch of branch the next checkpoint reads the repository's files from its index too. Some repository settings turn this off, such as Git LFS or another filter, line-ending settings (for a folder inside a repository, also those set above it), a sparse checkout or a partial clone: then all of its files count.
- A chat whose worktree was removed has no checkpoints left: they are deleted with it. So are a chat folder's checkpoints once the folder is deleted some other way: Lookout looks for those every hour. A project's own folders keep theirs, and so does a folder on a disk that isn't connected now.
- Files outside the chat's folder, and what a command did elsewhere (a push, a database write, a package installed globally), are not part of a checkpoint.
- Once the chat's folder is removed and until its checkpoints go, This turn still shows what a turn that finished there changed, read from its checkpoints, without the folder's ignore files or a correction for a checkout move. This chat shows its changes up to its last checkpoint of the folder. Lookout says this chat's folder was removed, and Uncommitted, a turn the removal cut short, and a revert, restore or commit there do nothing. A folder made again at the same path (a new worktree with the same name) is not the chat's folder.
- A revert, a restore or an undo can't start while a turn, a subagent or a compaction runs in the same folder, in this chat or another. Lookout says what to wait for, such as Wait for the turn to finish, and names the other chat by its title when the work is another chat's.
Related
- Worktrees: Give a chat its own branch and folder, then merge its work back into your project.
- Safety: What the agent can reach on your machine, what limits it, and how to undo what it did.
- Chats and projects: Projects hold your folders and their chats, and the message box sends, queues, steers and stops the agent's work.