Nine kinds of command to read twice before you approve an AI agent
17 November 2026, updated 17 November 2026
A coding agent asks before it runs a command so that a person can catch the bad one. In practice, after the fortieth npm test, most of us press allow without reading. The prompt is still there and the check has stopped happening.
The fix is to approve the boring commands in advance and save your attention for a short list of patterns. This is that list. Most of it is taken from what Claude Code’s own auto mode classifier blocks by default, which is published in its permission modes docs, so it reflects what the people building these tools consider risky.
1. Anything that downloads and runs code
curl -fsSL https://example.com/install.sh | bash
The script is fetched and executed in one step, so you approve code nobody has read. Ask the agent to download the file, show it to you, and run it as a separate command. The same goes for wget ... | sh and for running a package you have never heard of with npx.
2. Deletes with a wide or unclear target
rm -rf "$BUILD_DIR"/*
Read the path, and ask what happens if the variable is empty. A recursive forced delete whose target is an unset shell variable is on the classifier’s block list for good reason. Be equally careful with rm -rf on anything outside the project, and with find ... -delete.
Claude Code has a built-in check here: recognised removals of the filesystem root, your home directory, or the working directory and its parents always prompt, in every mode. The docs say the check can miss some commands, so read the path anyway.
3. Git commands that throw work away
git reset --hardgit checkout -- .andgit restore .git clean -fdgit stash dropandgit stash cleargit push --force
Each of these destroys something that may not exist anywhere else: uncommitted changes, untracked files, a stash, or commits on the remote. Before you approve, ask what is uncommitted right now. If the answer is “your afternoon”, say no and commit first.
4. Pushes and remote changes
A plain git push is usually fine. Slow down when the branch is one that deploys, such as production or gh-pages, and when the agent wants to change where pushes go with git remote set-url or git remote add. Merging a pull request nobody has reviewed belongs in this group too.
5. Infrastructure teardown and production changes
terraform destroy
Along with pulumi destroy, cdk destroy, production deploys and database migrations. These act on systems outside your laptop, where git cannot undo them. An agent should almost never run them for you. If it asks, find out why it thinks it needs to.
6. Commands that send data out
Look at where a request goes and what it carries. A curl -X POST to an unfamiliar host with a file or an environment variable in the body is how a secret leaves your machine. This is also the shape a prompt-injection attack takes: the agent reads a web page or an issue that tells it to send something somewhere.
Reading .env in order to call the API those keys belong to is normal. Printing a live token into the conversation, or posting it to another host, is not.
7. Flags that disarm a safety check
--insecure, --no-verify, --force, --no-sandbox, -k. Each one exists to get past a guard that was stopping the command. Sometimes that is right. It deserves the question “what was the guard complaining about?” before you approve.
The same applies to an agent starting another agent with its checks off, such as launching a nested session with --dangerously-skip-permissions.
8. sudo and changes to your shell or keys
Anything with sudo runs as root. Edits to ~/.zshrc, ~/.ssh, .npmrc, git hooks or .git/config change how your machine behaves after the session ends. Claude Code treats many of these as protected paths and prompts for writes to them in its normal modes.
9. Commands you cannot read
bash -c "$(echo cm0gLXJmIH4vcHJvamVjdHM= | base64 -d)"
If a command is wrapped in sh -c, built from variables, or decoded at run time, you are not approving what you see. This also defeats text-matching rules: the Claude Code docs note that a deny rule for Bash(rm *) does not stop bash -c 'rm -rf build/'. Ask the agent to write the command out plainly, and decline if it will not.
Turn the list into rules
Reading carefully works better when you are asked less often. In Claude Code, put the routine commands in allow and the patterns above in ask, so they prompt in every mode:
{
"permissions": {
"allow": [
"Bash(npm run *)",
"Bash(git commit *)"
],
"ask": [
"Bash(git push *)",
"Bash(git reset *)",
"Bash(git clean *)",
"Bash(rm *)",
"Bash(curl *)",
"Bash(sudo *)"
],
"deny": [
"Bash(terraform destroy *)",
"Read(./.env)"
]
}
}
Ask rules apply when any part of a compound command matches, so cd /tmp && git clean -f still prompts. They match the command as written, so a command phrased another way can slip past them. The syntax and its limits are in permission rules in settings.json. For a boundary that does not depend on the command text, turn on the sandbox; the options are compared in what —dangerously-skip-permissions does.
Codex CLI comes at this from the sandbox side, so many of these commands hit its limits before they reach you. See Codex CLI approvals and sandbox modes.
Three questions for any prompt
When a command is not on the list and you are unsure:
- Can I undo it? A file edit in a git repository, yes. A delete outside the repository or a change to a remote system, no.
- Does it reach outside this project? Other folders, the network, your credentials.
- Did I ask for this? A command that goes beyond the task is the one to question.
If you cannot undo it, it reaches outside the project, or you did not ask for it, read it slowly.
Make the prompt easy to read
You can only judge a command you can see in full, at the moment it is asked, without hunting for the right terminal. A truncated one-line prompt in a tab behind your editor gets a reflexive yes.
NotchDaddy shows each request from Claude Code, Codex CLI or Gemini CLI in the MacBook notch with the tool, the project and the exact command or edit, so you read it where you already are and answer with Allow or Deny. If you do not answer, it is never approved on your behalf; for Claude Code and Codex the request goes back to the terminal prompt. You do not need it to follow anything in this post. The rules above are free and do most of the work. It helps when the prompts you kept are arriving from several sessions at once. See approving Claude Code from the notch.