Normalized permission modes for agent session execution.
Each AI provider has its own mechanism for controlling tool permissions:
- Claude:
--permission-modeflag with modes likebypassPermissions - Codex:
--full-autoand--dangerously-bypass-approvals-and-sandboxflags - Amp:
--dangerously-allow-allflag
This module defines a provider-agnostic set of permission modes that each adapter maps to its SDK's native semantics.
Modes
| Mode | Description |
|---|---|
:default | Provider's default permission handling |
:accept_edits | Auto-accept file edit operations (Claude-specific; no-op on others) |
:plan | Plan mode — generate plan before executing (Claude-specific; no-op on others) |
:full_auto | Skip permission prompts, allow all tool calls |
:dangerously_skip_permissions | Bypass all approvals and sandboxing (most permissive) |
Summary
Functions
Returns all valid permission modes.
Normalizes a permission mode value.
Returns true if the given value is a valid permission mode atom.
Types
Functions
@spec all() :: [t()]
Returns all valid permission modes.
Normalizes a permission mode value.
Accepts atoms, strings, or nil. Returns {:ok, mode} for valid values
or {:error, reason} for invalid ones. nil input returns {:ok, nil}.
Returns true if the given value is a valid permission mode atom.