Command approval
Every command the AI wants to run appears in full and waits. Three buttons end that wait, and the middle one changes more than this one call.
Diagram as text
- The AI asks to run a command.
- The chat's setting decides what happens next: Ask every time, Allowlisted commands only, Auto-accept edits or Never ask.
- With Never ask or Auto-accept edits, the command runs without a question.
- With Allowlisted commands only, it runs if every part of the command is on your list. Commands with $(...), backticks, redirection or a backslash always ask.
- Otherwise the command appears in full and waits. Approve runs it once, as you typed it if you edited the text.
- Always in this chat runs it and switches the chat to Auto-accept edits. Always allow runs it and adds a pattern to your allowlist.
- Deny refuses and returns [denied by user] to the model. With no answer in 5 minutes the request expires and the assistant stops and sums up what is left.
- A command that runs keeps its exit code and output in the chat.
What you see when it stops
waits here
the command, in full
When the command can be edited, that box is a text field. Change the text, press Approve, and what runs is what you typed.
A line here says what Always in this chat does: it ends the questions for the whole chat. A chat has four settings: Ask every time, Allowlisted commands only, Auto-accept edits and Never ask.
- Approve
- Runs it once.
- does more than this callAlways in this chat
- Switches the whole chat to Auto-accept edits, so every later tool runs without asking. Change it back under the chat's settings.
- Deny
- Refuses and returns
[denied by user]to the model.
fewer questions
The command allowlist
Set a chat to Allowlisted commands only and commands on your list run without asking. Everything else still waits for you. When a command asks, Always allow approves it and adds a pattern to the list. Edit the list under Settings, Command allowlist; it applies to all your chats.
how a pattern matches
npm testallows exactly that commandnpm run:*allows that start with any arguments- in a chained command (
;&&|||), every part must be on the list $(…), backticks, redirection and\always ask
if you do not respond
The request expires
After five minutes, the pending request expires. The assistant stops and reports what remains undone.
after it runs
In the chat
A command that runs keeps its exit code and output in the chat.
a command card holds
- the command
- its exit code
- its output