A permission prompt is the question a coding agent such as Claude Code or Codex asks before it takes an action that needs approval, like running a shell command or editing a file. You can allow it once, allow it for the future, or deny it. Allow rules, permission modes and sandboxes decide which actions prompt in the first place.
A permission prompt is the question a coding agent asks you before it performs an action that needs approval, such as running a shell command, editing a file or fetching a URL. The agent pauses until you answer, so the prompt is the point where a person decides whether the action happens.
In Claude Code's default (Manual) mode, Bash commands and file edits require approval, except a built-in set of read-only commands. Reading files in your working directory does not prompt. In Codex, the approval policy (for example on-request) decides when the agent stops to ask.
Example
Claude Code wants to run your test suite. The terminal shows a "Bash command" prompt with a short description ("Run the test suite"), the command npm test, and the question "Do you want to proceed?". The options, as shown in the Claude Code docs, are Yes; Yes, and don't ask again for npm test *; Yes, and switch to auto mode (not on every prompt); and No.
Choosing "don't ask again" for a Bash command saves an allow rule to .claude/settings.local.json at the root of the repository, so matching commands stop prompting in future sessions.
What decides whether a prompt appears?
Several layers, checked before the prompt is shown:
- Rules:
allow,askanddenyrules in settings files. An allow rule such asBash(npm run test *)skips the prompt; a deny rule blocks the action outright. See allowing commands in Claude Code. - Permission modes: Claude Code modes such as
default,acceptEdits,plan,autoandbypassPermissionschange which actions ask. See permission modes. - Sandboxing: with Claude Code's sandbox in auto-allow mode, commands that run inside the sandbox can be approved without a prompt.
- Hooks: a
PermissionRequesthook runs when a tool call needs a permission decision and can return allow or deny. See agent hooks.
{
"permissions": {
"allow": ["Bash(npm run test *)"],
"ask": ["Bash(git push *)"],
"deny": ["Read(./.env)"]
}
}Why permission prompts matter
Prompts are the main human-in-the-loop control in coding agents. They catch honest mistakes and actions triggered by prompt injection. Their cost is attention: an unanswered prompt blocks the agent, and too many prompts push people toward skipping permissions entirely.
The practical balance is to allow routine commands with rules and keep prompts for anything that changes state outside the project, such as pushes, deployments, deletions and network calls. Allowbar, a Mac menu bar app, shows Claude Code and Codex prompts in a panel at the top of the screen with Allow, Block and Terminal buttons; it never answers on its own.
Related
Sources
Frequently asked questions
Why does Claude Code keep asking for permission?
In Manual mode, Claude Code asks before most shell commands and file edits. Add allow rules for commands you trust, or choose "don't ask again" on a prompt, and those commands stop asking.
What happens if I never answer a permission prompt?
The agent waits. Nothing runs until you answer, which is safe but can stall a long task if you are away from the terminal.
Can a hook answer a permission prompt?
Yes. In Claude Code, a PermissionRequest hook can return a decision to allow or deny the tool call. Codex also has a PermissionRequest hook event.