Before you approve something irreversible, see what it will change.
Your permission prompt stays. OLP adds information to help you decide.
OLP (Outcome Lookahead Protocol) is an open specification for looking ahead at the outcome of an agent's action.
0.1.2: A Claude Code hook. Before a delete, its card lists which files and how many; before an overwrite, how many.
Claude Code users approve 93% of permission prompts
OLP doesn’t decide for you. Before anything runs, it shows what will happen and what else you can do. (Anthropic, 2026)
See what will be deleted, and how many, first
Before your AI agent deletes files, see which ones and how many. Before it overwrites, see how many. OLP shows them first, so you decide. Free and open source, version 0.1.2. Each card that appears is also logged on your machine, one line per card.
The choice is yours
Before an MCP tool or shell command touches your files, git history, or database, a card appears in the permission prompt.
We read 104 public reports of AI agent write incidents
In 87 of them, the agent itself deleted or destroyed something that couldn’t be undone.
- 50files and folders deleted
- 27git history destroyed (reset --hard and similar)
- 10databases deleted
A sample of public issues. These are the reporters’ own accounts, not a count of all incidents.
How to read the card
- 3 files
- Three files would be deleted. Counted on this device in read-only mode.
- Undo: not confirmed
- OLP couldn’t confirm a way to undo this, because no recovery location was declared.
- before engine check · no receipt
- The engine check hasn’t run, so there’s no receipt (a record of what was asked, what was shown, and who chose). Cards in this version don’t create receipts.
npx @feedpia/olp install
That’s the whole install.
Works on Windows x64, macOS (Apple silicon, Intel), Linux x64, and Linux arm64. install adds the hook to your Claude Code settings file.
To update, run the same install command again.
Other ways to install: download the archive, or set it up by hand
Verify the download’s checksum first
E7548450AC1779113F6076C6572CD45DE8F3C0BE8F4A2666A6863231F1A4B92F
Download the archive for your operating system and the checksum list (SHA256SUMS) from the repository’s latest release. Your archive’s checksum should match the line with the same name in that list. The value shown here is for the Windows archive (olp-hook-windows-x64.zip). Run this line in PowerShell and paste the result into the box.
(Get-FileHash .\olp-hook-windows-x64.zip -Algorithm SHA256).HashIf even one character differs from the value above, don’t run the file. Tell us.
If the checksum matches, extract the archive in your Downloads folder, then run install from your project folder
~\Downloads\olp-hook.exe installinstall writes the settings line for you, with the file’s full path. Keep the archive outside your project so it doesn’t end up in your repository. On macOS or Linux, run ~/Downloads/olp-hook install. On macOS, if you downloaded it with a browser, first run xattr -d com.apple.quarantine ~/Downloads/olp-hook (this release isn’t signed yet, so macOS blocks it; you don’t need this if you used curl).
Put olp-hook on your PATH or built it from source? You can add this line to your Claude Code settings yourself
"hooks": { "PreToolUse": [ { "matcher": "Bash|PowerShell|mcp__.*", "hooks": [ { "type": "command", "command": "olp-hook", "timeout": 10 } ] } ], "PostToolUse": [ { "matcher": "Bash|PowerShell|mcp__.*", "hooks": [ { "type": "command", "command": "olp-hook", "timeout": 10 } ] } ] } To turn OLP off, delete the olp-hook line from your settings.
At your next permission prompt, look before you choose.
It’s one line to install.
- This is an early release, so features and screens may change. The one-line install and the direct downloads both cover Windows x64, macOS (Apple silicon, Intel), Linux x64, and Linux arm64.
- The file isn’t digitally signed, so Windows may show a warning. Check that the checksum matches before you run it.
- Apart from an optional daily signal that’s off by default, the hook doesn’t connect to the internet, and it doesn’t send your file contents or commands anywhere.
Good to know
- The hook only counts. It never runs the original command.
- If you choose Yes, the agent runs the command. If you choose No, the command doesn’t run. The choice is yours.
- It runs only on your machine. Apart from the optional daily signal that’s off by default, the hook doesn’t connect to the internet.
- The engine check hasn’t run yet. Nothing on this page guarantees that an action is safe.
Known limitations
- OLP asks for approval before running commands it doesn’t recognize, even read-only ones.
- On slow machines, OLP may ask about more PowerShell commands. Delete and overwrite cards still appear as usual.
- The cards OLP adds to the permission prompt are in English only.
- On first install, the terminal can stay blank for several seconds while npm downloads the package. OLP starts once the download finishes.