GuidesHosting choices

Pi vs OpenCode: the minimal coding agent and the full one

Pi 1.2 and OpenCode 2 side by side on a server: install, models and plans, what each does without asking, extending them, and reaching each from a phone.

October 13, 2026The Everpod team
The short answer

Both are free, MIT-licensed coding agents for the terminal, and the difference is how much comes built in. Pi is deliberately small: four tools, no sub-agents, no plan mode, no permission prompts, and you add what you want as TypeScript extensions or ask Pi to write them. OpenCode is a full product: build and plan agents, sub-agents, web search, undo, a background server with a web interface, and free models that work with no account. Pick Pi if you want to shape the agent yourself and keep its prompt small; pick OpenCode if you want it working out of the box and reachable from a browser. Neither sandboxes itself, and both makers say to run it in a container or a virtual machine for unattended work.

The two on a fresh server

Installed side by side on an Ubuntu 24.04 cloud server on October 13, 2026, with each maker’s one-line installer and no account connected:

Pi 1.2.0OpenCode 2.0.28
Installerpi.dev/install.shopencode.ai/v2/install
NeedsNode.js 22.19 or newer (the installer can add it)Nothing: one native binary
InstallAbout 7 seconds, 153 MB under ~/.piAbout 3 seconds, 202 MB under ~/.opencode
Shell filesLeft alone; it prints the PATH line to addAppends its PATH line to ~/.bashrc
Idle memoryAbout 150 MB for the interfaceAbout 300 MB for its background server, plus the interface
No account“No models available. Use /login”Eleven free models listed; one answered in two seconds
Asks before actingNo, by designNo, in the default agent
curl -fsSL https://pi.dev/install.sh | sh             # Pi
curl -fsSL https://opencode.ai/v2/install | bash      # OpenCode 2

OpenCode has two live versions, and the shorter address, https://opencode.ai/install, still gives version 1 (1.19.0); the OpenCode install guide covers the split. Pi moved to a new npm name in May 2026, @earendil-works/pi-coding-agent; the old @mariozechner/pi-coding-agent stops at 0.73.1 and is deprecated.

What each gives you before you add anything

Pi’s README states its design in one line: “Pi ships with powerful defaults but skips features like sub-agents and plan mode. Ask Pi to build what you want, or install a package that does it your way.” It starts with read, bash, edit and write, with grep, find and ls available but off. There is no web search tool, no background shell (its site says to use tmux) and no to-do list; MCP servers have been built in since September 2026. The guide to Pi sets out what it leaves out and why, in its makers’ words.

OpenCode builds those things in. Its agents page lists a Build agent that does the work, a Plan agent that “Explores and plans without editing normal project files”, and two sub-agents, General and Explore, that “run with fresh context in foreground or background child sessions.” It searches the web through one of five providers you choose on first use, runs long commands in the background, and has /undo, which rolls back the conversation and the files together. Version 2 does not run language servers, though its home page still lists “LSP enabled”; version 1 does, off by default.

The cost of Pi’s smallness is that you assemble more yourself; the payoff is a short system prompt, which leaves more of the model’s context for your work, and an agent you can change from inside a session: “If you need a command, tool, provider, workflow, or UI tweak, just ask Pi to build it”, its site says, then /reload.

Whether it asks before it acts

Neither stops to ask before ordinary work. Pi says so plainly in its security guide: it “does not ask for approval before every tool call.” It has no permission system to switch on; a confirmation step is something you build as an extension. What it does ask is whether to load a project’s own extensions, settings and skills the first time it finds them, which it calls project trust, and its guide is clear that this “does not limit what tool calls can access or affect.”

OpenCode has a permission system, and its default lets almost everything through. Its permissions page starts every agent from an allow-all rule with exceptions, and the agents page says the Build agent’s “sensitive environment-file reads and access outside the workspace ask for approval.” With 2.0.28 on October 13, run as opencode run in a git repository, it wrote a file and ran touch in the project without asking, refused to read the project’s .env (“This non-interactive run cannot ask the user for permission, so the request was rejected”), and read /etc/hostname and wrote a file outside the repository without asking. A rule for external_directory set to ask in the project’s opencode.jsonc did not stop the write either, and what does is not established here; so rely on where the agent runs, as the next paragraph says, rather than on that rule. Rules are a list of action, resource and effect, and “The last matching rule wins”. The permissions page’s own example asks before any shell command, allows routine Git inspection and blocks pushes, in opencode.jsonc:

{
  "$schema": "https://opencode.ai/config.json",
  "permissions": [
    { "action": "shell", "resource": "*", "effect": "ask" },
    { "action": "shell", "resource": "git status *", "effect": "allow" },
    { "action": "shell", "resource": "git diff *", "effect": "allow" },
    { "action": "shell", "resource": "git push *", "effect": "deny" },
  ],
}

Neither is a sandbox, and both say so. OpenCode’s security policy: “OpenCode does not sandbox the agent. The permission system exists as a UX feature” and “If you need true isolation, run OpenCode inside a Docker container or VM.” Pi’s guide calls running it “entirely inside a container, virtual machine, or sandbox” “usually the strongest practical option.” Either way, the files and keys the agent can reach are the ones its user account can reach, so a machine of its own, with nothing on it you haven’t given it, contains a mistake better than the laptop that holds everything. The guide to running agents without prompts compares how Claude Code and Codex handle the same choice.

Models, plans and keys

Pi keeps keys and tokens in ~/.pi/agent/auth.json; OpenCode 2 keeps them in its database, ~/.local/share/opencode/opencode.db.

Extending them

A Pi extension is a TypeScript module that can add tools, commands, keyboard shortcuts, model providers or screens, loaded with no build step; Pi’s own examples include a sub-agent, a plan mode, a permission gate and protected paths. Extensions, skills, prompt templates and themes travel together as packages, installed with pi install npm:<package>, and Pi’s catalogue listed 5,468 on October 13. An extension “runs inside the Pi process with the same operating-system permissions”, so it can read whatever Pi can.

OpenCode adds plugins (packages or local files listed in opencode.json), custom agents and slash commands written as Markdown files, skills, and MCP servers. Plugins written for version 1 do not run in version 2. Both read skills in the shared Agent Skills format, and both route MCP tools through a small JavaScript runtime by default rather than listing every tool to the model. For instructions, Pi reads AGENTS.md or CLAUDE.md; OpenCode 2 reads AGENTS.md only.

On a server, and from your phone

This is where the two differ most. OpenCode 2 runs one background server per user account, and every client talks to it: the terminal interface, the desktop app, and a web interface it serves itself, “available by default and password protected” on port 49374, listening only on the machine. From a laptop you reach it through an SSH tunnel, and opencode pair prints one-time links that sign a browser in. opencode pair --remote goes further and, in its own warning, “will expose your OpenCode server to the internet”, through OpenCode’s tunnel service, OpenTunnel, with your server password as the lock. The guide to OpenCode’s web interface on a server covers both routes and what each exposes.

Pi has no server and no web interface. It is a terminal program, and its makers describe it as “built to run on your (remote) machine, inside a terminal, driven by one person.” On a server that means SSH and tmux, which keeps each Pi running after you disconnect; Pi’s tmux page asks for set -g extended-keys on so it can tell Enter from Shift+Enter. From a phone you reach it through an SSH app, or you run Pi on the phone itself, which Pi supports on Android through Termux. For scripts, Pi has a print mode (pi -p), a JSON event stream and an RPC mode for driving it from another program; OpenCode has opencode run, with --format json, and its server’s API.

Sessions are kept differently too: Pi writes each one as a JSON Lines file under ~/.pi/agent/sessions/, stored as a tree so you can branch from any earlier message, and OpenCode 2 keeps them in its database. OpenCode 2 cannot share a session yet; Pi’s /share uploads one as a private GitHub gist, or to Earendil’s Radius service when you have set that up.

Which to pick

Both are popular in their own right on October 13, 2026: OpenCode had 213,139 stars on GitHub and Pi 114,816, and Pi’s npm package was downloaded 4.2 million times in the week to October 11, though npm counts installs from every source and the two install through different routes. On what each scores with the same model, the evidence is thin; the Pi guide summarises the one independent test that ran both.

Run Claude Code, Codex, OpenCode, Pi, Hermes or OpenClaw on an always-on developer pod.

A developer pod is a cloud computer of your own with your pick of Claude Code, Codex, OpenCode, Pi, Hermes and OpenClaw installed, reached only over your own Tailscale network. From $24 a month, built in about ten minutes.