# Approval prompts aren't a security model for AI agents

> Source: <https://dev.to/paxtechnologyservices/approval-prompts-arent-a-security-model-for-ai-agents-1kec>
> Published: 2026-12-06 03:59:41+00:00

**Recommendation:** Restrict what agents can touch by default and gate only irreversible actions — money, ads, security headers, production writes — behind approval tied to an exact plan hash, since prompt fatigue drops detection to about 5%.
More in the playbook "Securing agents and AI tools": <https://wpnews.pro/playbooks/agent-security>

Be honest: how many approval prompts did you click yesterday, and how many did you actually read?

[Steve](https://dev.to/steve-o/human-in-the-loop-breaks-at-the-fiftieth-approval-2i71) ([@steve-o](https://dev.to/steve-o)) asked the same thing in a post this week, and the comments are the best part. One reader, smtahosin, counted: "yesterday: 31 prompts, read maybe 6 properly. the ones i read were all file deletes, everything else got a reflex yes."

That is the whole problem in one line. This week dev.to has been arguing about AI agents in production, and I read six of the hot threads plus their comments. They look like six different topics. They are one argument:

**A person clicking Allow is not a security model. Limit what the agent can touch, and keep human approval for the few things that can't be undone.**

I'll show where each thread supports that, give approvals a fair hearing first, and end with a Monday-morning config you can paste. Disagree in the comments. I mean it.

Approvals are not useless. They are just rarer, and better built, than most setups.

[Pierre-Laurent Medori](https://dev.to/pierrelaurentmedori/one-claude-code-session-supervised-another-it-wouldnt-relay-my-approval-to-write-to-prod-5d6i) ([@pierrelaurentmedori](https://dev.to/pierrelaurentmedori)) wrote up one where the approval worked. A Claude Code session wanted to write to a production database. The session that was supposed to supervise it kept relaying his answers along, but the writing session held a line: the go-ahead had to come from him, in its own session, quoting the hash of the exact plan. The supervisor's reply was "I won't relay it."

What made it work:

`--confirm` flag has to be that plan's SHA-256 hash, and a plan older than 24 hours is refused by default.
Notice what he also admits, though: the tool only compares hashes, so the rule about who approves "rested on the session's own judgment". A commenter, prpatel05, suggested moving that out of the model entirely, with a token only the human's terminal can mint. That is the direction I'd push too.

[Rajan Nishad](https://dev.to/rajan_nishad/i-let-ai-agents-run-my-production-site-for-6-months-heres-everything-they-broke-1mdh) (rajan_nishad) lets an agent run his production server and still keeps a small approval list: "Anything touching money, ads or security headers needs my OK first. Routine fixes it just deploys." Few prompts, high stakes, and he'll read every one.

Even Anthropic's own data says people read when you give them something worth reading: when Claude shows a plan for approval, [users reject 39% of them](https://claude.com/resources/articles/auto-mode-default-in-claude-code). For single permission prompts, 3%.

So approvals work when they are rare, specific and tied to one exact action. Keep that list in your head. It comes back at the end.

Steve's post makes the habit argument with numbers. I checked them against the source. In [a study with 1,053 paid testers](https://claude.com/resources/articles/auto-mode-default-in-claude-code), a single dangerous command was swapped into a permission prompt, and testers blocked it 13.6% of the time (143 of 1,053). Early in a session they blocked about 17%, and after 50 or more prompts about 5%.

Two honest caveats. Those are Anthropic's figures, and Anthropic sells the alternative, which is auto mode, where a classifier approves instead of you. And testers knew they were in a study, so real life could be better or worse.

But don't miss the other half of that page. Anthropic reports the classifier missed 7% of attacks on a synthetic, adversarial test set, and says it "does not eliminate risk" and still recommends reviewing high-stakes production changes yourself. Swapping a tired human for a classifier moves the gate. It doesn't shrink what is behind it.

Here is what I noticed reading the rest: almost none of the damage in these posts would have been stopped by one more prompt.

**It was never a prompt problem.** Rajan's worst week was a deploy loop that restarted his app 176 times and cost him search rankings. His fix was not an approval. It was "one deploy script with automatic rollback. No other way to deploy exists." The agent can't take the bad path because the bad path is gone.

**The box itself was the problem.** [Mounir](https://dev.to/supermnr/i-built-a-200-line-canary-test-to-audit-my-ai-agent-setup-my-dev-box-scored-14-2j2) (supermnr) wrote a 200-line checker and ran it on his own dev machine: `~/.ssh` and `~/.docker` readable, a local Ollama port reachable, outbound HTTPS wide open. Score: 1 out of 4. Clicking Allow on every prompt wouldn't have changed one of those. His rule for where an agent should live: "zero production databases, zero personal SSH keys, and nothing you would cry about wiping in 30 seconds."

**The check lived in the wrong place.** [Dimitris Kyrkos](https://dev.to/cyclopt_dimitrisk/mcp-didnt-give-your-agent-permission-it-gave-it-a-phone-book-41hp) (cyclopt_dimitrisk) has the line of the week: "Interoperability is not authorization." A tool schema that says "Admins only" is a sentence, not a check. If the model fills in `tenant_id`, or one credential covers every tool, a prompt is decoration. His test is brutal and good: call the tool directly, as the wrong user, with no approval. "If any of those calls succeed, no prompt will save you."

**Even the smart fix routes humans by exception.** [Anis Meziani](https://dev.to/anis_meziani_52aab42304a8/how-we-made-an-ai-workflow-100x-cheaper-and-27-faster-we-stopped-asking-an-llm-to-decide-k7i) (anis_meziani_52aab42304a8) replaced LLM calls with a decision model that returns a probability per option. Anything below a confidence threshold takes an explicit "uncertain" route to a person. By their numbers, half as many documents were left for a human to match by hand. Humans see the doubtful slice, not everything. A commenter, kevinhall, added the part I like most: also send a small random slice of the confident ones, because the uncertain share can look flat while one route quietly gets sure about the wrong thing.

Put those together and the thesis writes itself. The question isn't "how do I get people to read more prompts?" It's "what's the worst this agent can do if the human clicks yes on autopilot, or the classifier is wrong?" Shrink that, and the prompts you keep are worth reading.

Claude Code's own docs are blunt about the same thing: a deny rule for `git push *` [doesn't stop](https://code.claude.com/docs/en/permissions) `git -C . push origin main`. Rules are a speed bump. An operating-system sandbox is a wall.

Every time you've ever clicked "Yes, and don't ask again" on a command, Claude Code [saved that as a rule](https://code.claude.com/docs/en/permissions) in `.claude/settings.local.json`. Those reflex clicks are now standing permissions.

**Paste that file, or your `settings.json`, into the [free settings scanner](https://agents.paxtechnologyservices.com/tools/claude-code-settings-scanner/?utm_source=devto&utm_medium=article&utm_campaign=approvals-dont-scale).** It runs in your browser and nothing leaves it. It shows which allow rules are doing too much, which deny rules are missing, and whether the sandbox is on.

Thirty minutes. Do them in this order.

**1. Count your prompts for one day.** Steve's tip, and it works. How many did you approve, how many did you read, how many would you have refused? If the last number is zero, those prompts are noise.

**2. Turn on the sandbox, then put deny rules on top.** Here is a project-level `.claude/settings.json`. The key names come from the [permissions](https://code.claude.com/docs/en/permissions) and [sandboxing](https://code.claude.com/docs/en/sandboxing) docs:

```
{
  "permissions": {
    "disableBypassPermissionsMode": "disable",
    "allow": [
      "Bash(npm run test *)",
      "Bash(git status)",
      "Bash(git diff *)"
    ],
    "ask": [
      "Bash(git push *)"
    ],
    "deny": [
      "Bash(git push --force *)",
      "Bash(curl *)",
      "Bash(wget *)",
      "Bash(rm -rf *)",
      "Read(./.env)",
      "Read(./.env.*)",
      "Read(./secrets/**)",
      "Read(~/.ssh/**)",
      "Read(~/.aws/**)"
    ]
  },
  "sandbox": {
    "enabled": true,
    "failIfUnavailable": true,
    "allowUnsandboxedCommands": false,
    "filesystem": {
      "denyRead": ["~/"],
      "allowRead": ["."]
    },
    "network": {
      "allowedDomains": ["github.com", "registry.npmjs.org"]
    }
  }
}
```

What each part is for:

`python` or `docker run`, stays out.` git push`.` denyRead` keeps your home folder away from shell commands. `allowUnsandboxedCommands: false` stops the agent from retrying a failed command outside the sandbox.`Read` deny rules are still in there.
I ran this exact file through the scanner above: 0 high, 0 medium, 0 low. A sloppy sample I wrote (`Bash(git *)`, `Bash(curl *)`, `Bash(rm *)`, `Bash(python3:*)` and friends) got 6 high, 4 medium, 2 low. A clean scan doesn't prove a file is safe, and the tool says so too. It's a check for the common mistakes, nothing more.

**3. Using Codex?** Same idea, in `~/.codex/config.toml`, from the [Codex docs](https://developers.openai.com/codex/agent-approvals-security):

```
sandbox_mode = "workspace-write"
approval_policy = "on-request"

[sandbox_workspace_write]
network_access = false
```

Commands inside the sandbox run without asking. Editing outside the workspace or using the network asks. The prompts only happen at the edge, which is where you want them.

**4. Scope the tokens.** An agent doesn't need your personal token. Use a [fine-grained token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) for one repo with a short expiry. Keep other secrets out of the agent's environment: Claude Code's sandbox has a `credentials` block that can hide files like `~/.aws/credentials` and variables like `GITHUB_TOKEN` from shell commands. Dimitris's rule applies too: the search tool should not carry a credential that can delete.

**5. Pin your MCP tool lists.** A tool you approved last week can change its description this week. I wrote up a small pin-and-diff check: [You approved that MCP tool. How would you know if it changed?](https://dev.to/paxtechnologyservices/you-approved-that-mcp-tool-how-would-you-know-if-it-changed-33ec)

**6. Put walls outside the agent.** Branch protection with required reviews, so nothing merges on one person's say-so, yours or the agent's. That's another of Steve's, and it's the same lesson as Rajan's deploy script.

**7. Spend your approvals like money.** Keep them for production writes, sends and spending. Make each one show the exact action, bind it to that action the way Pierre-Laurent's hash does, and let it expire. Then you're back where the fair case started: rare, specific, tied to one exact thing.

Be honest: **when did you last actually read an approval prompt before hitting yes?**

And the one I really want answered: **if your sandbox was tight, would you drop approvals entirely, or keep a few?**

If you ran the scanner, drop your result in the comments (just the "N high, N medium" line) or share the deny rules you swear by. I'll read every one.

*PTS, [@paxtechservices](https://x.com/paxtechservices)*
