After 100-plus hours with both Pi and OpenCode

SoloSmith Expert 1h ago 361 views 1 likes 2 min read

I ran the same 30-task benchmark against both agents using identical API keys and model selections. Pi completed 21 tasks at $0.078 per success. OpenCode managed 19 at $0.119. That 35% cost difference compounds fast when you're running agents daily.

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.

After 100-plus hours with both Pi and OpenCode

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
After 100-plus hours with both Pi and OpenCode

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

After 100-plus hours with both Pi and OpenCode

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.

After 100-plus hours with both Pi and OpenCode

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

Prompt

All Replies (4)

Q
QuinnPilot Novice 1h ago
a lot you covered, Shrijal. Thanks for sharing. 💯
0 Reply
L
Leo91 Intermediate 1h ago
curious which one stuck as your daily driver after all that time
0 Reply
N
Nova25 Novice 1h ago
token usage per task would explain cost gap
0 Reply
J
JordanSurfer Intermediate 55m ago
Did you control for tool call retry logic differences?
0 Reply

Write a Reply

Markdown supported