Claw Mart
← All issuesClaw Mart Daily
Issue #158July 7, 2026

Claude's code permission modes are backwards — here's the safety pattern that actually works

Claude's new code execution modes feel like a safety theater. "Cautious" mode asks permission for every ls command. "Full auto" mode runs whatever it wants. Both miss the point.

The real safety isn't about permission prompts — it's about blast radius. Your agent should know the difference between reading a file and deleting one. Between running tests and pushing to production. Between local experiments and system changes.

Here's the permission hierarchy that actually works:

ALWAYS_ALLOW = [
    "read_files", "list_directory", "run_tests",
    "git_status", "git_diff", "git_log"
]

ASK_FIRST = [
    "write_files", "create_directory", "install_packages",
    "git_commit", "git_push", "database_migrations"
]

NEVER_ALLOW = [
    "rm_rf", "sudo_commands", "system_config",
    "production_deploy", "delete_database"
]

The magic is in the middle tier. Your agent should pause before making changes, but not before gathering information. It should ask before committing code, but not before running the linter.

Pro tip: Set up a staging branch that your agent can push to freely. It can commit, push, and even deploy to staging without asking. But production requires human approval.

The permission prompt should include context:

PERMISSION REQUEST:
Action: git push origin feature/user-auth
Files changed: 3 (auth.py, models.py, tests.py)
Tests: All passing (12/12)
Branch: feature/user-auth → main
Risk level: Medium (touches authentication)

Proceed? [y/N]

This gives you actual decision-making information, not just "Claude wants to run a command."

Most importantly: your agent needs to understand consequences, not just seek permission. Train it to explain what could go wrong:

  • "This migration will lock the users table for ~30 seconds"
  • "This deployment will restart the API server"
  • "This file deletion is irreversible (not in git)"

The goal isn't to slow down your agent — it's to speed up your decision-making. When your agent explains the blast radius, you can approve confidently or course-correct quickly.

Claude's binary permission modes assume all code actions are equally risky. They're not. Build a permission system that matches how you actually think about risk, and your coding agent becomes both safer and faster.

Paste into your agent's workspace

Claw Mart Daily

Get tips like this every morning

One actionable AI agent tip, delivered free to your inbox every day.