Skip to content

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.

6 min read13 pages in Concepts

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.

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:

Terminal window
astranize decide t-0003 D-4 --option allow_always --workspace notes

allow_always writes the rule to the workspace’s permissions.yaml, so the agent will not ask again:

workspaces/notes/permissions.yaml
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.

  • ask gives the agent the step’s tools plus your permissions.yaml rules. Anything else is denied, and the step asks you with a permission decision.
  • worktree lets 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.
  • free lets 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.

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.”

Either way, the mode is not part of config.yaml. It is a policy of this computer, saved per workspace in ~/.astranize/settings.yaml:

~/.astranize/settings.yaml
workspaces:
notes:
permission_mode: worktree

For one step, set permissions in the Trajectory, in its YAML tab or in flows/<name>.yaml:

flows/default.yaml
- id: developer
type: develop
permissions: worktree

For one task, add permission_mode: free (or ask, worktree) to the frontmatter of tasks/<id>.md. There is no app control for this one.

For each agent step, Astranize takes the first of these that applies:

  1. The task’s own permission_mode, when its task file sets one.
  2. The step’s permissions in the flow. But permissions: free only counts when the workspace mode is also free.
  3. The workspace mode, ask by 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 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: free falls back to the workspace mode unless you set the workspace to free. 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-permissions is refused. In a flow’s tools, the flow fails to load with dangerously-skip-permissions is not allowed. In permissions.yaml, the rule is dropped.
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.
  • 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 worktree step is refused with: The worktree mode needs a sandbox that claude cannot provide on this system; choose "ask" or run on macOS or Linux.