
[](#quickstart)
[](LICENSE)
> **permission slip** *noun*
> A permission slip grants one risky agent action that only a prompt the human types can issue. It names what the action permits, ends on a defined condition, and a hook outside the model checks it before the tool call runs.
>
> *An agent can't sign its own permission slip.*
The idea comes from sudo, break-glass access and capability tokens. The repo's shape, an essay with working code beside it, comes from 12-Factor Agents by HumanLayer. ([sudo](https://www.sudo.ws/), [12-Factor Agents](https://github.com/humanlayer/12-factor-agents))
## The problem
Coding agents now run deploys, apply database migrations, publish packages, spend money on ad platforms and start many subagents at once. Most of those actions should happen only after you approve them and only for the thing you named.
Writing "never deploy without asking" in the prompt does not enforce the rule. The model treats it as context. A long task, a summarised history or a confident plan can outweigh it, and the agent that broke the rule also decides whether it followed the rule.
Approving every tool call does not enforce the boundary. After the fortieth prompt, you approve without reading, and the call that matters looks like the others.
**How do you give an agent permission for one dangerous thing, for one stretch of work, in a form it cannot forge?**
## How it works
Two hooks share a small ledger. The issue hook reads each prompt you submit and records any slip you typed. The check hook runs before every tool call, matches the call against your rules, and denies a guarded call that holds no valid slip. The model never writes the ledger. It sees only a line saying what was issued or why a call was denied.
```mermaid
sequenceDiagram
actor Human
participant Issue as slip.py issue