Skip to content

Permissions ​

Last updated Nov 27, 2026 View as Markdown

Runs use the harness's automatic permission review by default, the safest mode that still lets an agent change files unattended. On Codex that review covers only requests to leave Codex's sandbox; commands inside the sandbox run without review. To skip the harness's permission checks for one run, say so explicitly:

terminal
sh
pandra run . --prompt "Fix the failing test." \
    --permission-mode bypass

--yes never skips permission checks.

Which setting wins ​

permission-mode is auto, bypass, or read-only. The first setting in this table that is set decides, and --dry-run shows which one did (dry runs):

SettingSet with
The option, for one run--permission-mode bypass
The agentpandra config set --agent github.com/acme/reviewer permission-mode bypass
The harness, for every run of itpandra config set harnesses.pi.permission-mode bypass
Your defaultpandra config set defaults.permission-mode bypass
Nothing setauto

So --permission-mode auto wins over every configured bypass, and an agent set to auto wins over a harness set to bypass. The keys are in settings of one agent.

Let an agent only read ​

An agent that only reviews can run in read-only: it reads files and runs only what its harness counts as changing nothing, and the harness denies everything else without asking. To set it for one agent:

terminal
sh
pandra config set --agent ./agents/reviewer permission-mode read-only

For one run, pass --permission-mode read-only instead.

Work that writes, such as a build or the project's tests, needs auto. What the agent can still run depends on the harness:

HarnessWhat the agent can runWhat can still write
Claude CodeFile reads and read-only commands such as ls, cat, grep, and read-only git, inside its working directories and the directories of its skills, and the commands that permissions.allow in [harnesses.claude-code.settings], an --allowedTools harness argument, the agent's skills, or, with account-skills, your claude.ai account's skills pre-approveA pre-approved command, such as a skill's Bash(cargo clippy:*), through the programs it starts
CodexCommands inside its sandbox, where nothing is writable, /tmp included, and there is no networkA command that a rule your administrator installed allows outside the sandbox
PiThe tools read, grep, find, and ls, unless your harness arguments name other tools with --tools, or an extension that [harnesses.pi.settings] loads replaces oneNothing else, unless you added such tools

read-only does not cover the services that MCP servers act on. Claude Code runs only the MCP tools that are pre-approved as above, Pi runs none unless your --tools names one, and Codex runs a tool when its server marks it as read-only, or as neither destructive nor acting on systems outside the server. Those marks are the server's own claim, so give a reviewer that must not change anything only servers that cannot change anything.

  • On Claude Code, a skill's other files, such as its references/*.md, lie under Pandra's data directory, outside the working directories. Pandra lets the agent read the directories of its skills, which also hold its instructions, and opens nothing else there, such as the other files of the session's harness home or the homes of other sessions. Your own permission rules still apply: a Read deny rule or permissions.blockReadsOutsideWorkingDirectories refuses these reads, and a rule of yours that allows another path there lets the agent read it.
  • An agent in read-only cannot start nested runs, unless a Claude Code rule or skill pre-approves the pandra command.
  • In Claude Code's TUI, you can still leave read-only with Claude Code's own mode switch (Shift+Tab); the agent cannot.

Files in the harness home ​

A resumed session's harness home can hold files that let the harness do more than read-only allows, such as Codex's rules from a "don't ask again" answer in auto, Claude Code's subagents, commands, and skills, and Pi's extensions. A read-only resume of such a session stops before the harness starts, with permission_mode_unavailable, and names the file. In this sample, the paths are shortened and the progress lines left out:

text
$ pandra resume 2ec6c8e1b78d --headless --prompt "Review the change."
  Session:  2ec6c8e1b78d (project)
error: ~/.local/share/pandra/environments/homes/2ec6c8e1.../agents/writer.md would let the harness act beyond read-only; remove it, or run in auto

Remove what the message names, or, on Claude Code or Codex, resume in auto: pass --permission-mode auto for one run, or set the agent's permission-mode to auto.

Pi ​

Pi has no permission checks, so a Pi run starts only in bypass or read-only. In auto, the default, it fails before anything starts and gives the run in each mode Pi has, read-only first:

text
$ pandra run . --harness pi --headless --prompt "Review the change."
error: . cannot start: 1 problem
  pi has no permission mode auto; it runs in bypass or read-only
  To run on pi in read-only:
    pandra run . --harness pi --permission-mode read-only --headless --prompt 'Review the change.'
  To run on pi with its permission checks skipped:
    pandra run . --harness pi --permission-mode bypass --headless --prompt 'Review the change.'

An AI agent can take the read-only step on its own; the bypass step is yours. pandra config set harnesses.pi.permission-mode bypass makes bypass the mode of every Pi run that neither the option nor the agent's setting decides, while Claude Code and Codex keep their checks.

Running as root ​

Claude Code refuses to skip permission checks as root unless IS_SANDBOX=1 says the machine is itself a sandbox, so Pandra stops such a run before it starts:

text
$ pandra run . --prompt "Fix the failing test." --permission-mode bypass
error: . cannot start: 1 problem
  the harness refuses to skip permissions as root unless its environment variable IS_SANDBOX is exactly 1; to keep skipping them, run as a user other than root, or set IS_SANDBOX=1 if this machine is a sandbox (Pandra never sets it itself)
  To run it without skipping permissions:
    pandra run . --permission-mode auto --tui --prompt 'Fix the failing test.'

The step passes --permission-mode auto, so it runs in auto whatever your configuration sets. When bypass comes from your configuration, the error first gives the config set step that sets it back to auto in the table it came from:

text
$ pandra run . --prompt "Fix the failing test."
error: . cannot start: 1 problem
  the harness refuses to skip permissions as root unless its environment variable IS_SANDBOX is exactly 1; to keep skipping them, run as a user other than root, or set IS_SANDBOX=1 if this machine is a sandbox (Pandra never sets it itself)
  To stop skipping permissions in the configuration:
    pandra config set defaults.permission-mode auto
  To run it without skipping permissions:
    pandra run . --permission-mode auto --tui --prompt 'Fix the failing test.'

The config set step changes every later run that takes its mode from that table, so it is yours; an AI agent can take the run step, which changes only that run.

In a container, run Pandra as a non-root user, or set IS_SANDBOX=1 yourself when the container is the sandbox. Codex has no such check.

Released under the Apache License 2.0