Skip to content

Pi: safety, permission modes and how to run it

Pi is a minimal terminal coding agent with no permission prompts. How project trust works, how to restrict tools, its 2026 advisories and how to run it safely.

Live checkLogs readChecked
Made by
Earendil (created by Mario Zechner)
Runs in
Terminal, Print and JSON modes, RPC, TypeScript SDK
Platforms
macOS, Linux, Windows
Licence
MIT, open source

4 public advisories

Security advisories and reported issues since 2025, from vendor advisories, NVD and public reports. Checked December 2, 2026.

4Advisories (CVE or GHSA)
0Other reported issues
4Name a fixed release
1Rated critical or high

What Pi is

Pi is a minimal agent harness that gives a model read, edit, write and bash tools, and lets you add extensions, skills, prompt templates, themes and shareable packages. It runs interactively, in print or JSON mode, over RPC, or through a TypeScript SDK. The project started as badlogic/pi-mono under the npm name @mariozechner/pi-coding-agent. The current site, pi.dev, and the current package, @earendil-works/pi-coding-agent, sit under Earendil, and the old npm scope is deprecated with no patched releases. This is the terminal coding agent, not Inflection's Pi chatbot.

Install Pi

Installer on macOS and Linux:

curl -fsSL https://pi.dev/install.sh | sh

Installer on Windows:

powershell -c "irm https://pi.dev/install.ps1 | iex"

npm (Node.js 22.19 or newer):

npm install -g --ignore-scripts @earendil-works/pi-coding-agent

Pi news and advisories

Releases and announcements, with public security advisories on the same line.

  1. Pi 1.7.0 added terminal session resume, which repeats the original tool restrictions so a resumed session cannot gain access. It also removed install telemetry reporting. The release page shows day and month only; the year is inferred.

    Pi release notes
  2. Pi 1.6.1 added decision models in codemode and per-notice settings for cache and compaction messages.

    Pi release notes
  3. Pi 1.6.0 updated undici to 8.12.4 for six advisories and changed the OpenAI default model.

    Pi release notes
  4. Pi 1.5.1 let pi auth login and pi auth logout run from the shell without starting a session.

    Pi release notes
  5. GHSA-jfgx-wxx8-mp94

    Temporary extension installs from --extension used predictable paths in the OS temp directory, so on a shared Linux host another user could plant code that Pi loaded with the victim's privileges. Reported by CrowdStrike researchers.

    GitHub Security Advisory
  6. GHSA-mqxh-6gq7-558m

    Before 0.79.0, Pi loaded executable extensions and settings from a repository's .pi directory at startup without asking for trust, so opening an attacker's repo could run their code. CVE-2026-54325.

    GitHub Security Advisory
  7. GHSA-r95r-rj6r-c39x

    A race when writing auth.json could leave API keys and OAuth tokens readable under umask-based permissions for a short window. The fix opens the file as mode 0600.

    GitHub Security Advisory
  8. GHSA-7v5m-pr3q-6453

    HTML session exports did not consistently reject unsafe URL schemes in Markdown links, so a crafted link in a shared export could run script. Regenerate exports made from sessions that held untrusted content.

    GitHub Security Advisory

How Pi keeps itself in bounds

Out of the box, no permission prompts: tools run with the launching user's privileges. Only loading of project-local extensions and settings is gated by a trust prompt.

ModeHow to turn it onAsks youWhat it allows
Default (no approvals)
pi
Never
Enables read, bash, edit and write. Pi has no built-in permission popups and runs with your user's access.
Project trust prompt
defaultProjectTrust setting: ask (default), always or never; --approve / -a and --no-approve / -na per run
For some actions
Asks once before loading a repo's .pi settings, extensions, skills, MCP servers and prompts. It does not limit what tool calls can reach.
Tool allowlist
--tools read,grep,find,ls, --exclude-tools, --no-builtin-tools or --no-tools
Never
Removes tools from the model. Starting without bash and write gives a read-only session.
Print and JSON mode
pi -p "<task>" or --mode json
Never
One-shot runs that cannot show a prompt. They skip trust-gated project files unless you pass --approve.
Extension permission gate
An extension you write or install (permission gate and protected path examples exist)
For some actions
Pi's docs suggest building your own confirmation flow as an extension, or running it in a container.

Where its settings live

PathWhat it holds
~/.pi/agent/settings.json
Global settings, including defaultProjectTrust and defaultTools (override the directory with PI_CODING_AGENT_DIR)
~/.pi/agent/auth.json
API keys and OAuth credentials
~/.pi/agent/models.json
Custom models and endpoints
~/.pi/agent/trust.json
Saved project trust decisions
.pi/ (in a project)
Project settings, mcp.json, extensions, skills, prompts, themes and SYSTEM.md. It loads only after trust is granted.
AGENTS.md
Project context file, loaded without a trust check, so treat it as untrusted input
AGENTS.override.md
Override context file, loaded the same way
CLAUDE.md
Also read as context, loaded the same way
  • Pi runs with the permissions of the account that started it and does not ask before each tool call. Extensions, package installers and child processes get the same access.
  • The docs say transcript review, project trust and diff review are not security boundaries. Safety depends on limiting what Pi can reach: files, credentials, processes and network.
  • Project trust only decides which project-supplied resources load at startup. Until version 0.79.0 Pi loaded a repo's .pi extensions with no prompt at all.
  • The strongest option the docs describe is running all of Pi inside a container, VM or similar boundary. They list a Gondolin micro-VM extension, plain Docker and OpenShell, and note that isolating only the built-in tools leaves Pi itself and its extensions outside it.

Security incidents and advisories

DateAdvisoryWhat happened
Temporary extension installs from --extension used predictable paths in the OS temp directory, so on a shared Linux host another user could plant code that Pi loaded with the victim's privileges. Reported by CrowdStrike researchers.Fixed in 0.78.1
Before 0.79.0, Pi loaded executable extensions and settings from a repository's .pi directory at startup without asking for trust, so opening an attacker's repo could run their code. CVE-2026-54325.Fixed in 0.79.0
A race when writing auth.json could leave API keys and OAuth tokens readable under umask-based permissions for a short window. The fix opens the file as mode 0600.Fixed in 0.78.1
HTML session exports did not consistently reject unsafe URL schemes in Markdown links, so a crafted link in a shared export could run script. Regenerate exports made from sessions that held untrusted content.Fixed in 0.78.1

How to run Pi safely

  1. Run Pi inside a container or VM with only the project mounted, as the docs recommend, rather than as your everyday user.
  2. Keep credentials out of that environment, or give Pi short-lived, narrowly scoped keys.
  3. Use --tools to start read-only sessions (read, grep, find, ls) when you are only exploring a codebase.
  4. Update to 0.79.0 or later, and move from the deprecated @mariozechner package to @earendil-works/pi-coding-agent. Old-scope versions got no fixes.
  5. Leave defaultProjectTrust on ask, and answer no for repositories you have not read. Context files like AGENTS.md still load, so read them too.
  6. In scripts and CI, use print or JSON mode without --approve so project-local extensions stay unloaded.
  7. Install extensions and packages only after reading them, since they run inside the Pi process with your access.
  8. Review sessions before you share or export them, because they can hold command output, file contents and credentials.

Where Excellent fits

What Excellent doesWith Pi
Reads its session logs (free scan)
Yes
Its key finder reads its key files
Yes
Live check before risky actions (Pro)
Yes, in its own hook settings
Before a force push to main
Refuses and tells Pi to ask you
Excellent's sandbox
Claude Code and Codex only
Rule sharing
Claude Code and Codex only

Excellent reads Pi's session logs on your Mac. The free scan shows what it did: your email in request commands or form inputs, keys sitting in logs, secrets files read, history overwritten, checks skipped. Each finding says which agent and where.

With Pro, Excellent adds its live check to Pi's own hook settings, after listing what it will change. It blocks your email on its way to a website, an API key typed into a command, and deleting a folder you marked never-delete.

Excellent's check can't make Pi stop and ask you. So before a force push to main or skipping git hooks, it refuses and tells Pi to ask you first.

Excellent's sandbox and rule sharing are for Claude Code and Codex only. The check reads what a command says, so it isn't a wall around your Mac.

Questions

Does Pi ask before running commands?

No. Its docs state there are no permission popups, and tools run with your user's privileges. You add limits with tool allowlists, extensions or a container.

Is this the same as Inflection's Pi?

No. This Pi is an open source terminal coding agent by Mario Zechner, now under Earendil, at pi.dev. Inflection's Pi is a separate chatbot.

Where did badlogic/pi-mono go?

The code and site now sit under earendil-works, and the npm package is @earendil-works/pi-coding-agent. The old @mariozechner scope is deprecated and the advisories list it as having no patched releases.

Does Pi support MCP?

Yes. Project settings can carry an .pi/mcp.json file, and MCP tools can be kept or excluded with the tool flags. It only loads after you trust the project.

Where does Pi keep its settings and keys?

Under ~/.pi/agent by default: settings.json, auth.json, models.json and trust.json. Set PI_CODING_AGENT_DIR or use --agent-dir to move it.

Sources

Checked December 2, 2026. Pi changes often, so its own docs win where they differ from this page.

More agents

All agents →

Check what Pi did on your Mac

Get the Mac app