Permission modes
A permission mode decides what an agent may do without asking you, from asking for every new command to working freely inside the task's worktree.
Each agent step has a list of tools it may use, such as reading files, editing them or running npm test. Sooner or later an agent wants something that is not on the list, like npm run db:reset. The permission mode decides what happens then: ask you, let it act inside the task’s worktree, or let it do anything.
There are three modes, ask, worktree and free. Every workspace starts on ask, the safest one.
What happens when an agent asks for more
Section titled “What happens when an agent asks for more”Say the developer, in ask mode, wants to run npm run db:reset, which is not on its tool list. The tool is denied and the step pauses with a decision, “The agent asked for a permission”. The context says what it asked for, for example Bash: npm run db:reset, and you get three options:
| Option | Effect |
|---|---|
allow_once |
Allows it in this step only and continues where it stopped. |
allow_always |
Saves the rule in workspaces/<ws>/permissions.yaml and continues. |
deny |
The step goes on without it. |
Answer from the For you screen in the app, or with decide:
astranize decide t-0003 D-4 --option allow_always --workspace notesallow_always writes the rule to the workspace’s permissions.yaml, so the agent will not ask again:
allow: - Bash(npm run db:reset) - WebFetch(domain:example.test)Rules use Claude’s own format: Bash(npm run db:reset), Edit(src/notes.ts), WebFetch(domain:example.test), or just the tool name. These rules are added to the tool list of every Claude step that runs in ask mode.
The three modes
Section titled “The three modes”askgives the agent the step’stoolsplus yourpermissions.yamlrules. Anything else is denied, and the step asks you with a permission decision.worktreelets the agent edit files and run commands without asking, but only inside a sandbox limited to the task’s worktrees. When something is still denied, it asks you the same way.freelets the agent do anything, with no sandbox and no questions.
worktree is a good middle ground for a repo you trust: fewer questions, and the agent still cannot touch files outside the task. It needs a sandbox from the operating system, so it works on macOS and Linux but not on Windows.
Choose a mode
Section titled “Choose a mode”You can set the mode in three places: the workspace, one step of a Trajectory, or one task. The most specific one wins. Most of the time you only set the workspace’s.
Open Settings, Workspace, and pick the Permission tab. It lists Ask, Worktree and Free, each with a line on what it allows. The choice saves right away and applies from the next step that starts, not to a step already running. You also pick it in step 5 of the New workspace wizard, “Permission and commits”.
Picking Free asks first, with the dialog “Turn on Free mode?”: the agents run without asking anything and without a sandbox, with your permissions, outside the repos too. Confirm with Turn on Free mode. On Windows the tab adds “Windows has no sandbox for Worktree. Use Ask or Free.”
Use policies set:
astranize policies set --workspace notes --patch '{"workspace":{"permissionMode":"worktree"}}'{"type":"policies","workspace":{"profile":"padrao","permissionMode":"worktree"},...}Either way, the mode is not part of config.yaml. It is a policy of this computer, saved per workspace in ~/.astranize/settings.yaml:
workspaces: notes: permission_mode: worktreeFor one step, set permissions in the Trajectory, in its YAML tab or in flows/<name>.yaml:
- id: developer type: develop permissions: worktreeFor one task, add permission_mode: free (or ask, worktree) to the frontmatter of tasks/<id>.md. There is no app control for this one.
How the mode is picked
Section titled “How the mode is picked”For each agent step, Astranize takes the first of these that applies:
- The task’s own
permission_mode, when its task file sets one. - The step’s
permissionsin the flow. Butpermissions: freeonly counts when the workspace mode is alsofree. - The workspace mode,
askby default.
Every run reports the mode it used in the step_agent event ("permissionMode":"ask"). In the desktop app, the session view marks Free steps with “Free mode: no sandbox and no questions”.
Free is never on by default
Section titled “Free is never on by default”Free mode is powerful, so Astranize makes sure you turn it on yourself:
- The workspace default is
ask. - A flow file cannot turn Free on by itself. A step with
permissions: freefalls back to the workspace mode unless you set the workspace tofree. So a flow you copy from someone else never runs unconfined because of what it says. - The ideator never writes to your repos, not even in Free mode. It is always denied Edit, Write, NotebookEdit and Bash, unless its step in the Trajectory says
can_write: true(the step form calls it “Can change the repos”), and then the step reads “This step can change the repos.” - Any tool or rule containing
dangerously-skip-permissionsis refused. In a flow’stools, the flow fails to load withdangerously-skip-permissions is not allowed. Inpermissions.yaml, the rule is dropped.
All options
Section titled “All options”| Mode | Claude --permission-mode |
What the agent can do | What happens outside it |
|---|---|---|---|
ask |
default |
The step’s tools, plus the rules in the workspace permissions.yaml. |
The tool is denied, and the step pauses with a permission decision. |
worktree |
acceptEdits |
Edits and commands without asking, inside a sandbox confined to the task’s worktrees (--add-dir on worktrees/<task>, sandbox on, unsandboxed commands off). |
Denials still open a permission decision. |
free |
bypassPermissions |
Anything, with no sandbox and no questions. | Nothing is asked. |
Good to know
Section titled “Good to know”- A permission decision opens only for denied tools that you have not already allowed or denied.
- An unknown mode fails with
Unknown permission mode "yolo". - On Windows, a
worktreestep is refused with:The worktree mode needs a sandbox that claude cannot provide on this system; choose "ask" or run on macOS or Linux.
Next steps
Section titled “Next steps”- Decisions: how a permission decision is answered
- Flows: the
toolsandpermissionsstep keys - Economy and limits: the
policiescommand
