Skip to content
Isonapse
Install

What to do next

After the first run: let it learn while you work, try a first rule, then switch to Enforce when you are ready.

What to do next

How strict Isonapse is depends on its mode. There are three, and the mode is one setting for the whole machine. In the dashboard, open Hosts, then choose Change mode under This machine. Pick a mode, send it to your terminal, and approve it with isonapse approve. Enforce still checks whether the machine has learned enough. In the terminal, isonapse hook mode shows the current mode.

Profile
Watches and records. Your rules only advise; self-protection and hard limits still refuse. The command line's isonapse hook init starts here.
Normal
Normal applies your block and ask rules plus catastrophic and non-bypassable shell safety. The wizard and isonapse setup start a new machine here.
Enforce
Enforce adds behavioral review and uses what it learned. Unfamiliar work goes to confirmation or denial.

Try a first rule to see how it works. When you want behavioral review in Enforce, review the policy Isonapse proposes before applying it. These commands work with either install. The dashboard's Policies page offers the same rule changes with a form.

Let it learn while you work

Keep working as usual. Isonapse learns what normal looks like in both Profile and Normal: your agent's ordinary work is allowed and recorded. In Profile, your rules only advise. Fixed structural and resource limits plus the narrow self-protection guard can still block even there, and Codex's own requests to leave its sandbox are always refused. In Normal your block and ask rules and the safety floor apply while Isonapse learns. Check what it's learning:

isonapse hook report --details  # full last-24h and lifetime report
isonapse hook suggest --user --details  # the machine-wide rules it would write
isonapse hook explain "ls -la"    # preview a command without running it
Profile's exact data-protection boundary

Profile watches, records and learns; it is not a mode that masks data. Shell commands are checked and recorded but never changed to hide personal data, and a command too large to check, or one whose program name or path holds a credential, is still refused. Supported successful tool results are checked and warned about but not masked, and secret placeholders are not resolved. If Isonapse put masked data back for a call, that data is still replaced in a supported result while Isonapse's own hooks are in charge, or Claude Code is stopped before the next model turn; stopping cannot erase what Claude Code recorded. A prompt cannot be changed; only deny_on_ingress can block it.

Try a first rule

Rules are a Lua file, ~/.isonapse/policy/policy.lua, but you can start from a template: isonapse hook policy list shows them. This one keeps agents out of any folder named company-secrets, at any depth. Changing a rule or a mode needs an account that can use sudo (on macOS, an Administrator account).

1 · Apply the template

isonapse hook policy apply folder-deny

It asks for the password you log in to this computer with. It replaces your active policy. The old one is backed up first, and the command prints where. To go back, isonapse hook policy revisions lists earlier policies and isonapse hook policy rollback <revision> restores one, with one approval in a plain terminal window.

2 · Ask what each mode would do

isonapse hook policy test --read company-secrets/plan.txt

Nothing runs, and no record is written. It prints one line per mode: Profile reports it only (“would be: refused”), Normal and Enforce refuse it.

3 · Make it refuse, if you are in Profile

isonapse hook mode normal

isonapse hook mode shows your mode. If it already says Normal, as it does after the wizard's default, skip this command. Otherwise it asks you to confirm, and for that same login password. Profile only records what would be denied, so this rule takes effect in Normal or Enforce. Now ask your agent to read a file in a company-secrets folder: it is refused. isonapse hook mode profile goes back to watching, after you confirm.

Use your own folder

A pattern that ends in a slash covers that folder and everything under it, and a relative pattern matches at any depth. Save this as my-policy.lua with your folder's name:

return {
  blocked_file_patterns = {
    ["tool:Read"] = {"my-folder/"},
    ["tool:Write"] = {"my-folder/"},
  },
}

Then try it, and make it live. Neither of the first two commands changes anything. The third shows the exact change and takes one approval with your login password, in a plain terminal window that runs no agent, such as macOS Terminal or Ghostty.

isonapse hook policy check my-policy.lua
isonapse hook policy test --candidate my-policy.lua --read my-folder/plan.txt
isonapse hook policy activate my-policy.lua

Changed your mind? The same revisions and rollback commands undo this too.

What a folder rule does not do. It checks the targets a command visibly names; it is not operating-system confinement. It does not see unknown programs, hard links that already exist or later changes. A file rule denies even when an action rule permits the tool. Under a folder rule, a write that cannot be read in advance is denied, and so are Git commands that rewrite the working tree, such as pulls, merges and branch switches: run those yourself. With a read rule, Normal and Enforce also refuse a command that runs code whose reads Isonapse cannot name, such as python or node. On Codex and other registered hosts, location-dependent file rules refuse relative paths, so write the absolute path.

For ready-made policies and more kinds of rule, see Recipes. For rules that belong to one repository, see project rules. For what a policy looks like, see A simple policy.

Switch to Enforce

This moves the whole machine to Enforce, with rules drawn from what Isonapse learned. You read those rules first. When the picture looks right, review the exact point-in-time baseline policy it would write if the profile and live policy stay unchanged and you make no new catastrophic PERMIT/DEFER choices, then flip the switch:

1 · Generate the proposal

isonapse hook suggest --user --diff

Stop here and review the complete no-new-choice baseline diff. Apply only when every proposed rule reflects the access you intend to grant across this machine. Re-run suggest if the profile or live policy changes before apply. Any new catastrophic PERMIT/DEFER choice you make during apply changes those bytes.

2 · Apply after review

isonapse hook apply

It asks for the password you log in to this computer with. From now on your rules plus the learned baseline decide. Changed your mind? isonapse hook mode profile requests a return to watching after authentication and permission checks. Managed or uncertain installations refuse changes that relax protection while enterprise approval support is unavailable. Want your block rules enforced without the learned lookup? isonapse hook mode normal switches to Normal: your block and ask rules plus the deterministic shell safety floor apply. Normal leaves out the behavioral review of unfamiliar work and ordinary destructive or opaque programs; Enforce adds it. Watch decisions stream live with isonapse hook witness monitor.

Enforce's exact data-protection boundary

In Normal and Enforce, your personal-data action can mask personal data in supported tool results, hold a result for review or block it before the model sees it. Shell commands are still never changed to hide personal data: a credential in a command can need your approval or be refused, and other personal data is recorded under the default action; a pii_action of deny or defer still refuses the command or asks first. Resolving allowed secrets, putting masked data back for local tools and safe dry-run changes all happen before Isonapse approves the exact final command, once. Web and MCP tools count as off this machine unless you mark them local, so they keep masked data masked, but plain text in their arguments is not checked for personal data. What happens to each kind of data, mode by mode, is on the What it does page.

Stuck? Help finds the message you see.