# Should I let my AI tool run commands and install things?

> Yes, when the command matches what you asked for and stays inside your product’s folder. Say no when it wants to delete files, install something you didn’t ask for, or change your database or an online account.

Web page: https://buildladder.com/answers/let-ai-run-commands

## What to do

- If you use Claude Code: Recent versions start terminal and VS Code sessions in auto mode, where a second AI checks risky actions instead of asking you. To approve every edit and command, press Shift+Tab until the bar at the bottom says “manual mode on”. Never turn on bypass permissions, which the docs keep for isolated machines.
- If you use Codex: In a folder saved with Git, Codex suggests Auto. It edits files and runs commands in your product without asking, and asks before it works outside the folder or uses the internet. Type /permissions and pick Read Only while you’re only planning. Don’t start it with --yolo, which turns off the sandbox and every approval.
- If you use Cursor: Open Settings, then Agents, then Approvals & Execution. The default, Auto-review, runs commands in a sandbox where it can and has a checker review the rest. To approve every command, choose Allowlist, leave the list empty and keep sandboxing off. Avoid Run Everything, which runs every action without asking. File-Deletion Protection stops it deleting files without asking.
- If it offers “Yes, and don’t ask again” or “always allow”: That saves a rule, so the same command runs without asking next time. In Claude Code, a command rule lasts for every future session in that folder. Use it only for harmless repeats, like starting your site. To take one back, type /permissions and delete the rule.
- If it wants to put your product online, change your database, or run a command against an online account: Approve it only if you asked for that exact thing, one at a time and never with “always allow”. Going back to a saved version of your files won’t undo it.

## What you do

- Choose how much your AI tool may do without asking.
- Read each request before you approve it.
- Say no to deletes and installs you didn’t ask for.
- Approve one at a time anything that puts your product online, spends money or changes your database.

## What your AI tool does

- Explain each command before it runs: what it does, what it changes and whether it can be undone.
- Run everyday commands in your product, like starting your site.
- Suggest a safer way when you say no.
- Walk you through your tool’s permission settings.

## Prompt to copy

```text
Before you run any command in this product, tell me in one plain sentence what it does and whether it can be undone.
Always ask me first, and wait for my yes, before you:
- install anything
- delete files
- change anything outside this folder
- put my product online, or change my database or any online account
- sign in to anything or spend money
If I say no, suggest a safer way. Never ask me to paste a password or secret key into this chat.
```

## Sources

Updated 2026-11-10.

- [Claude Code’s permission modes](https://code.claude.com/docs/en/permission-modes)
- [Claude Code’s permissions](https://code.claude.com/docs/en/permissions)
- [Codex approvals and security](https://learn.chatgpt.com/docs/agent-approvals-security)
- [Cursor’s run modes](https://cursor.com/docs/agent/security/run-modes)
