Modes

auto

mode: "auto"

File changes are applied without asking — they keep a previous version. Commands, data and DNS are still asked, because none of the three can be undone.

writes go throughexec still askedstorage still asked
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

The line auto draws is not « safe / unsafe » but recoverable / not recoverable. A file the engine wrote has its previous version kept and its deletions go to a recycle bin; a dropped collection, a changed DNS record and a command that already ran have none of that.

What changes from ask

Categoryaskauto
writeaskedallowed
execaskedasked
storageaskedasked
dnsaskedasked
send · publish · moneyaskedasked

Exactly one row moves. Everything else is as it was — which is the point: auto is not « fewer questions », it is « no questions about files ».

What makes a write recoverable

  • write and edit on an existing file keep the previous content under .versions/.
  • delete moves to .trash/<timestamp>/ rather than removing.
  • Checkpoints keep the whole workspace as it was before each of your messages.
Auto is what checkpoints were built for

Letting file changes through is comfortable only if going back is one call. With checkpoints on — they are, unless you turn them off — rewind(n) puts the workspace back exactly as it was before a message.

A command is still asked, and that is deliberate

bash can do anything the account on that machine can do, including things far outside the workspace. It stays in the asked column in auto; always on a given command is remembered on disk, so a command you approve once is free in later sessions too.

Where it fits

// A refactor across a project you trust, with commands still gated
const agent = api.agents.create({
  runtime: "local", machine: pc, model: "gemini-3.5-flash",
  mode: "auto",
  onPermission: async ({ category, args }) => {
    if (category === "exec" && /^(npm test|npm run build)$/.test(args.command)) return "always";
    return "deny";
  },
});
import re

# A refactor across a project you trust, with commands still gated
def on_permission(request):
    if request["category"] == "exec" and re.fullmatch(r"npm test|npm run build", request["args"].get("command", "")):
        return "always"
    return "deny"

agent = api.agents.create(runtime="local", machine=pc, model="gemini-3.5-flash",
                          mode="auto", on_permission=on_permission)