Skip to main content
Permission modes set how much an agent may do — read-only exploration, auto-accept edits, or full bypass — from a single approval= string on the Agent.
This page covers the runtime PermissionMode enum (DEFAULT, PLAN, ACCEPT_EDITS, DONT_ASK, BYPASS). For the declarative mode: field in agent definition files (build / read-only / plan / review), see Agent Presets & Modes.
The user asks the agent to explore; approval="plan" keeps it read-only, so write and shell tools never run.

Quick Start

1

Simple Usage

Pass a mode string straight to the Agent:
2

Delegate to a subagent

The same mode strings work when spawning subagents:
Override the mode per subagent call:
3

From the CLI


Every alias resolves to the same mode

One string vocabulary spans every surface — PermissionMode.resolve() maps all of these onto five canonical modes. Matching is case-insensitive, and - and _ are interchangeable.
Library authors can call the resolver directly:
On praisonai run and praisonai code, the standalone --plan boolean flag is a discoverable shortcut for --approval plan; both resolve to PermissionMode.PLAN.

One vocabulary across every surface

Python, CLI, and YAML all route a preset name through the same resolver, so yolo means the same thing everywhere.

Toggle plan mode inside a session

In praisonai chat and praisonai code, /plan is the interactive on/off switch for PermissionMode.PLAN — no need to restart the session with --approval plan.
The status bar shows [PLAN] while the mode is active. Exiting restores whatever mode the session launched with (e.g. accept-edits, bypass) — not default — so an approval policy you chose at startup isn’t silently discarded. See Slash Commands › /plan for the full command reference.

Mode presets vs deny-set presets

Agent(approval=…) accepts two families of strings — they look alike but do different things. Both are valid on Agent(approval=…). Deny-set presets are matched first, so safe/read_only/full/off behave exactly as before; mode presets are checked only after, so no existing behaviour changes.
safe, read_only, full, and off are not modes — PermissionMode.resolve() returns None for them, and the deny-set machinery handles them separately.

Available Modes

Under accept_edits, write_file, edit_file, create_file, and apply_patch run silently — while execute_command, delete_file, and read_file still gate through the normal flow.
default and plan modes use the pattern engine end-to-end: pattern-based deny rules both hide tools at schema-build time and enforce at call time. MCP tools are covered by the same gate. See Approval › How tools are pruned from the LLM.
BYPASS skips all permission checks. For Claude Code backend, set both ClaudeCodeBackend(unsafe=True) and PRAISONAI_CLAUDE_BYPASS_PERMISSIONS=1.

Configuration Options

CLI mapping:
CLI dashes and Python underscores are equivalent — --approval accept-edits and Agent(approval="accept_edits") resolve to the same mode.

Best Practices

Set approval="plan" when an agent only reads and analyses code — write and shell tools are pruned, preventing accidental changes.
Exploration → plan. Refactoring → accept_edits. Interactive work → default. Trusted automation → bypass.
Reserve bypass (and its yolo / full_auto aliases) for fully trusted local development environments only.
accept_edits auto-approves file writes but still gates shell exec and deletes — safer than bypass when you only need edits to flow.

Approval

Require human approval before agents run dangerous tools

Permissions Module

Pattern-based allow, deny, and ask rules

Interactive Approval

Terminal approval experience for tool calls

Agent Presets & Modes

Declarative mode: field in agent definition files