cd /news/ai-agents/show-hn-permission-slips-only-your-p… · home › topics › ai-agents › article
[ARTICLE · art-177310] src=github.com ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Show HN: Permission Slips: only your prompt can issue coding-agent grants

A developer publishing under the handle kyisaiah47 released Permission Slips, an open-source plugin for Claude Code and Codex that lets only a prompt the human types issue a one-time grant for a risky coding-agent action, with a hook outside the model checking the grant before each tool call runs. The design rests on four rules — only a typed prompt issues a slip, every slip is scoped to a named target, every slip has a defined end, and the guard runs outside the model and fails closed — implemented as two hooks, slip.py issue on UserPromptSubmit and slip.py check on PreToolUse, sharing a per-session locked ledger the model never writes. The project argues that writing "never deploy without asking" in a prompt does not enforce the rule and that approving every tool call stops working after the fortieth prompt, and it installs via /plugin marketplace add kyisaiah47/permission-slips.

key takeaway

Scope each risky agent action to a slip issued only by a typed prompt, bound to a named target with a defined lifetime, and enforce it in a PreToolUse hook that fails closed outside the model rather than in the prompt.

read8 min views9 publishedNov 27, 2026
Show HN: Permission Slips: only your prompt can issue coding-agent grants
Image: Michielbdejong (auto-discovered)

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, 12-Factor Agents)

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?

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.

sequenceDiagram
    actor Human
    participant Issue as slip.py issue<br/>(UserPromptSubmit)
    participant Ledger as Ledger<br/>(per session, locked)
    participant Agent
    participant Check as slip.py check<br/>(PreToolUse)
    participant Tool

    Human->>Issue: prompt: fix the login bug, then /slip deploy api
    Issue->>Ledger: record deploy (api), until-spent
    Issue-->>Agent: Permission slip issued by the user: deploy (api)
    Agent->>Check: Bash ./scripts/deploy.sh api
    Check->>Ledger: valid deploy slip for api?
    Ledger-->>Check: yes
    Check->>Tool: allow
    Agent->>Check: Bash ./scripts/deploy.sh billing
    Check->>Ledger: valid deploy slip for billing?
    Ledger-->>Check: no
    Check-->>Agent: deny, with the command to ask for

The pattern has four rules. Each rule has its own page with the incident behind it and the code that enforces it.

# Rule One line
1 Signed by the human Only a prompt you type issues a slip.
2 Names the trip Every slip is scoped to a named target.
3 Good for one trip Every slip has a defined end.
4 Checked at the door The guard runs outside the model and fails closed.

Install the plugin in Claude Code. For Codex, see the Codex setup guide. (Codex, Claude Code)

/plugin marketplace add kyisaiah47/permission-slips
/plugin install permission-slips@permission-slips

Write a policy. A slip kind says how long a slip lasts. A rule says which tool calls need one. This policy guards a deploy script and takes the target from the command line:

// ~/.config/permission-slips/config.json  (or .permission-slips.json in a project)
{
  "slips": { "deploy": { "lifetime": "until-spent", "needs_target": true, "aliases": ["force-deploy"] } },
  "rules": [
    { "name": "production deploy", "tool": "^(Bash|exec_command)$",
      "pattern": "scripts/deploy\\.sh\\s+(?P<target>[A-Za-z0-9_.-]+)", "slip": "deploy" }
  ]
}

Now type the slip anywhere in a prompt:

fix the login bug, then /slip deploy api

The issue hook adds one line to the agent's context:

Permission slip issued by the user: deploy (api), good until it is spent.

The slip covers api and nothing else. If the agent tries another target, the check hook denies the call and tells it what to ask for:

production deploy needs a permission slip. Only the user can issue one, by typing: /slip deploy billing

An until-spent slip lasts through failed builds and retries. Your own deploy script ends it once the deploy has been verified live:

./scripts/deploy.sh "$target"
curl -fsS "https://$target.example.com/health" >/dev/null
python3 ~/.permission-slips/slip.py spend deploy "$target"

The fuller example policy is in slips/config.example.json.

These are the slips I run every day. Each one exists because something went wrong without it.

Slip Lifetime What it unlocks, and why it exists
/force-deploy <repo>... until verified live A slip names the repos to deploy and lasts until the deploy is verified live. Deploys go through one guarded script, and a scheduled nightly deploy is the standing authorization. Between nightlies, the slip names the repos to ship. A failed build, a refused upload or a failed post-deploy check keeps the slip for the retry. Only verified success spends it.
/deploy-all until every fix is committed The deploy command deploys every repo at once. The slip stays valid until every fix I asked for is finished and committed. One deploy then ships every repo, so no half-finished state goes out repo by repo.
/force-ads <platform> <campaign>... until armed A slip arms ad campaigns on one named platform and covers the campaigns named in the prompt. A failed arm keeps the slip, a campaign armed once needs a new slip, and each placement tier on a platform is its own scope.
/allow-multi-agents prompt A slip permits more than one subagent per prompt. One prompt asking for a new page across seven repos started seven agents in parallel. Now the first subagent in a prompt is free and the rest need a slip.
/allow-design-brief once A slip permits one subagent brief that carries design direction and is spent on one call. Colours, palettes and typefaces had gone into briefs without my being consulted, and the work drifted from what I wanted. The slip lets exactly one brief through, then the guard is back.

The incidents and their details are in How I use them. (docs/05)

The same two hooks cover more than deploys. Each row is a rule plus a slip kind.

Slip Guards Lifetime
/slip migrate prod prisma migrate deploy --env=prod and friends once
/slip push main git push to a protected branch once
/slip publish npm publish ,twine upload ,cargo publish once
/slip infra prod terraform apply ,kubectl delete once
/slip spend ads a script that raises a budget until-spent
/slip secret STRIPE_KEY reading one named secret once
/slip send standup sending one message once
/slip egress api.github.com curl /wget to one host session
/slip deps left-pad npm install <pkg> ,pip install <pkg> prompt
/slip rm build/ rm -rf on one path once

Simon Willison's lethal trifecta says an agent with private data, untrusted input and a way to communicate externally can be made to leak. Removing outbound access closes one leg. An egress slip reopens that leg for one named host, for one session, when you decide it is needed. (the lethal trifecta)

Config sketches for each row are in Slips you could write. (docs/06)

  • Allowlists and permission modes. Allowlists and permission modes are standing policy. They say what an agent may always do in a project. A permission slip is a one-time exception to that policy that you issue for a stretch of work and that ends on its own.
  • Bypass mode. Bypass mode removes every check for the whole session. A slip lifts one check for one named target until a defined end. Everything else stays guarded.
  • Approval prompts the agent triggers. An approval prompt the agent triggers asks you to judge a call the agent chose to show you, worded the way the agent chose. A slip comes from you first. You type what you want permitted before the agent acts, and the guard holds the agent to it.

Using slips with an allowlist #

Slips and allowlists work well together. Keep the allowlist strict, then use slips for the few actions you want gated by intent rather than by command. A slip also leaves a record: the ledger shows what was issued, in which prompt, and whether it was spent.

This is a guard against an agent drifting past your intent, not a sandbox against a hostile one. The full threat model is in its own page. (threat model)

  • An agent with a shell can try to reach the ledger by indirection, for example by building the path in a variable or writing it from a script. The self-protection check matches path text, so it catches direct writes and not every indirect one.
  • For a strong guarantee, keep the ledger where the agent's sandbox cannot write by pointing PERMISSION_SLIPS_STATE outside its writable roots.
  • The guard only sees tool calls that pass through hooks. A command it allows can start other processes it never sees, and rules match command text, so a guarded action reached by a different command is not caught.

The same author has other skill repos for Codex and Claude Code:

  • steal : Research design precedents and adapt useful mechanisms.
  • brand-pdf : Create documents using a website's real fonts, tokens, and components.
  • mobile-refine : Responsive layout QA beyond overflow checks.
  • session-handoffs : Four fresh-session handoffs between Codex and Claude Code, with portable launchers and duplicate protection.
  • bg-remove : Local background removal with clean edge colors.
  • dont-stop-working : Carry coding-agent tasks through verified completion.

This repo draws on sudo and its timestamp, break-glass emergency access, capability tokens and object-capability security, the hooks systems in Claude Code and Codex that make an outside guard possible, Simon Willison's writing on the lethal trifecta, and 12-Factor Agents for showing that a set of principles can live in a repo.

Copyright 2026 Isaiah Kim. Released under the skills license in LICENSE: you may install, use and privately adapt it. See LICENSE. Isaiah Kim (kyisaiah47). LICENSE · PRIVACY.md

── more in #ai-agents 4 stories · sorted by recency
── more on @permission slips 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-permission-s…] indexed:0 read:8min 2026-11-27 · —