Permissions

write

Changing the workspace. Asked in ask, free in auto — because every write the engine performs keeps what it replaced.

free in autokeeps previous versionsalways is per tool
Using Python?

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

askautoplanfull
askedallowedrefusedallowed

The tools

ToolDoes
writeCreates or replaces a file.
edit · multi_editReplaces exact strings inside one.
moveMoves or renames.
deleteMoves to the recycle bin.
convertConverts a file and saves the result.
create_image · create_video · create_voice · create_musicGenerate media and save it.
documentEvery action but list.
generateAsks a second model a question of its own.
A custom toolUnless you give it another category.

Why auto lets it through

  • Replacing a file keeps the previous content under .versions/.
  • Deleting moves to .trash/<timestamp>/.
  • Checkpoints hold the whole workspace as it was before each of your messages.

Nothing in this category leaves the machine, and nothing in it is final. That is the line auto draws — not « safe », but recoverable.

The media tools are the expensive ones

A generated video is a write that costs dozens of credits

They sit in this category because they save a file, not because they are cheap. In auto they are not asked — so a budget is what stands between a run and an expensive misunderstanding.

« always » here is per tool, for the session

onPermission: async ({ tool, category, args }) => {
  if (category !== "write") return "deny";
  if (tool === "write" && args.path.startsWith("generated/")) return "deny";
  return "always";        // this tool, for the rest of the session
}
def on_permission(request):
    if request["category"] != "write":
        return "deny"
    if request["tool"] == "write" and request["args"].get("path", "").startswith("generated/"):
        return "deny"
    return "always"        # this tool, for the rest of the session

Answering always for write frees every later write of the session, including paths you would have refused. Return once when the decision depends on the arguments.