After 100-plus hours with both Pi and OpenCode
The context overhead tells the real story. Pi's system prompt plus tool definitions sit under 1,000 tokens. OpenCode sends roughly 6,900 tokens per request. On long sessions, that's thousands of dollars in wasted context window.
# Agent Evaluation Prompt
You are evaluating two coding agents on identical tasks.
For each task, record:
1. Task description and expected outcome
2. Model used (provider + model name)
3. Total API calls made
4. Input tokens consumed
5. Output tokens generated
6. Wall-clock time to completion
7. Success/failure + reason if failed
8. Total cost (calculate from provider pricing)
Output a JSON array with one object per task.
Include aggregate stats: pass rate, median time, median cost, total spend.
Run this against both agents with your own keys. The numbers don't lie.
Where Pi wins
- Context efficiency: 7x less overhead per request
- Hackability: TypeScript extensions run inside the agent process — you're not fighting a plugin API
- Session model: Branchable trees with fork/rewind. OpenCode's linear log with undo/redo feels primitive after using Pi's session branching
- Resource footprint: Single lightweight process vs 1GB+ RAM for OpenCode's TUI
Where OpenCode wins
- Provider breadth: 75+ via AI SDK and models.dev vs Pi's 20+
- Cheap model access: Zen gateway at cost plus $10/month Go tier. Pi is strictly BYOK or local
- Surfaces: TUI, desktop, web UI, IDEs via ACP, GitHub/GitLab CI. Pi is terminal-only
- Permissions: Granular allow/ask/deny per tool with glob patterns. Pi gives full system access from prompt one
- Out-of-box features: Plan mode, MCP, LSP diagnostics, subagents — Pi expects you to build these

The VS Code vs Neovim analogy holds. OpenCode is a configured product. Pi is a programmable platform.
If you want a Claude Code replacement today with minimal friction, OpenCode delivers. If you're willing to invest in building your own harness and care about token efficiency, Pi's core is stronger.
My current setup: Pi for daily development with custom extensions, OpenCode for CI pipelines where I need the broader surface support.

The tiebreaker isn't features — it's whether you'd rather configure or code.
