Modes and approvals
What the agent may do without asking, how to approve a call, and the sandbox.
The mode decides what the agent may do without asking you. Pick one to see what it allows; reading files inside the project, searching the web, keeping its plan and asking you a question never wait, in any mode.
ask The default. Every change and every command waits for your yes.
- Read files, search the web, plan, ask youInside the projectGoes ahead
- Edit filesInside the projectWaits for you
- Run commandsTests, builds, scriptsWaits for you
- Reach outside the projectOther folders, .git, web pages, MCP toolsWaits for you
Change it with Shift+Tab in the CLI, --mode ask at the start, or the mode menu in the app's message box.
Ask is the default. "Outside the project" includes a link inside the project that leads out of it, and a write into .git waits like a command, because its hooks run on your next commit.
- CLI: Shift+Tab cycles Plan, Ask and Auto-edit, and Full auto too where commands run in the sandbox (never while a turn runs);
/mode auto-editsets any mode;--modestarts with one;/config mode asksaves the default. - App: the mode menu in the message box, or Settings, Permissions.
A call that waits shows what it will do, and you answer it:
| Answer | In the app | In the CLI |
|---|---|---|
| Yes, this once | Allow once Enter | 1 |
| Yes, and stop asking for that tool in this project | Always allow Shift+Enter | 2 |
| No | Deny Esc | 3 or Esc |
"Always" lasts for the session; the app lists those tools under Permissions, where Forget takes one back. Reading or writing outside the project, and writing into .git, still ask every time. In the CLI the answers are a list: the arrow keys and Enter work too, and No stops the turn so you can say what to do instead.
- In full auto, commands the agent runs may read anything your user can, but write only inside the project, the temporary folders and the caches of common build tools. On Linux (kernel 5.19 or later) this is Landlock; on macOS, the system's
sandbox-exec. - Sandboxed commands cannot change Git's hooks, settings or
infofolder in the project (on Linux a change is put back after the command, and the agent is told). Build caches (~/.cargo,~/.m2,~/.gradle,~/.nuget,~/.cache) stay writable because builds need them, and code there runs in later builds. - In full auto with the sandbox on, the agent's
writeandeditchange files only where sandboxed commands may write, and never Git's hooks and settings; anything else is refused with a note to switch to Ask or Auto-edit. - Opened on your home folder, or a folder that holds it, commands can't write there at all. Open a project folder.
- The
sandboxsetting (in/settings, orconfig.json) isauto(full auto only, the default),always(every command the agent runs, approved or not) oroff. A command you run yourself, with/bashor in the terminal, is never sandboxed.