How the poison0 agent protects
The poison0 agent runs on the same machine as your agent and acts on the change to a file, not the file at rest. Every change to a protected memory file is checked before it takes effect, and the result is one of three outcomes. This page is the behavior, not the model internals.
Where the protection sits
The unit of protection is the change, not the file:
- On the change: A file is only read, diffed and scored when it changes; nothing is judged at rest.
- Before it takes effect: The check runs at the moment of the write, not once at install.
- Local: The watcher and the evaluation run on the same machine as your agent.
What triggers a check
The watcher listens for filesystem events on the protected paths and evaluates only content that is created or written:
| Event | What happens |
|---|---|
| File created | Evaluated as a new change |
| File written or modified | The added content is diffed against the last clean state and evaluated |
| File removed or renamed | Not evaluated: Removing content is not a poisoning vector |
The three outcomes
Every evaluated change ends in exactly one of three outcomes:
| Outcome | When | What the poison0 agent does |
|---|---|---|
| Allow | The change is evaluated as harmless | The change is accepted and becomes the new clean state |
| Ask | The change is neither clearly safe nor a proven attack | The file is held in its last safe state and you are asked before it takes effect. For a file that is being created for the first time there is no earlier state, so declining moves the whole file into quarantine - reversibly |
| Roll back | The change is evaluated as a proven attack | The change is undone automatically and the file returns to its last clean state |
Rolling back is reversible
A roll-back never destroys content. The dangerous change is undone by restoring the last known-clean version, and the displaced content is kept, not deleted:
- Restore, not delete: The file is rewritten to its last clean state; the change is quarantined, held aside rather than erased.
- Recoverable: The displaced content is preserved verbatim, so a decision can always be undone.
- Logged: Every outcome is written to the local audit trail - what changed, when, and why.
Read next
The exact set of watched files: What the poison0 agent watches. The uncertain middle band: User confirmation prompts. The safe-by-default stance: Fail-closed.
After a quarantine: The agent is told
After an automatic quarantine the coding agent is told automatically. There is no desktop window and nothing to set.
| Item | Behaviour |
|---|---|
| Agent | The agent gets a fixed notice in its session: The file, a short case ID and the kind of attack, never the removed content. That keeps it from simply recreating the file |
| Frequency | Each case once per session, cases of the last 24 hours, at most five per notice |
| Agents | Claude Code, Codex, Gemini CLI, Cursor, Copilot CLI, Cortex Code, Cline, Kiro, OpenCode, OpenClaw. Windsurf offers no way to give the model a notice |
| Phone | A paired phone reports every quarantine and every block. Pairing is the consent |
| Viewing cases | sudo poison0 status and the audit log |
| Note in the console | Cloud devices with verdict sharing on only: A case marked as a false alarm shows that in the audit view. Private devices never report |
Quarantine: Commands
| Command | Effect |
|---|---|
sudo poison0 quarantine false-alarm <id> | Mark the case as a false alarm; it stays in quarantine |
sudo poison0 quarantine restore <id> | Restore the case |
poison0 setup-claude --notice-off | Remove the former notice hook from ~/.claude/settings.json; other entries stay |
sudo in an administrator terminal, without sudo.