Head to head · Agent harness · October 2026 research run

Pi vs OpenCode

Pi and OpenCode score within a point of each other on agent readiness, 68.4 (B) and 67.7 (B). Both do agent harness.

Which one, for what

Pi B

Good for Developers and pipelines that want a small, scriptable coding agent they can extend in TypeScript and drive over JSONL or RPC, inside their own container.

Ahead on

  • Reliability, 75 against 68
  • Maintenance & community, 87 against 81

Watch for

No permission system or sandbox. Tool calls run with the user's rights and without an approval prompt

OpenCode B

Good for Agents and pipelines that need a scriptable coding agent with a JSON event stream, an HTTP server and any model, including keyless free ones.

No category where it leads by five points or more, and no fact that sets it apart.

Watch for

Most permissions default to allow, and SECURITY.md says the permission system is not a sandbox

Score by category

CategoryWeight this runPiOpenCodeEdge
Reliability16%207568Pi +7
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%16.28488OpenCode +4
Agent ergonomics13%16.27679OpenCode +3
Security & auth14%17.56160Pi +1
Payments & pricing10%12.56060even
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8.88781Pi +6
Transparency & trust7%8.86467OpenCode +3
Negative events≤15-4-4
Total68.4 · B67.7 · B

Facts side by side

FactPiOpenCode
KindAgent harnessAgent harness
VendorEarendilAnomaly
Hosted endpointno (local only)no (local only)
Transports
AuthNoneNone
PricingFreeFreemium
x402nono
LicenceMITMIT
Read-only variant documentednono
llms.txtnono
Last release2026-10-072026-09-30
Terms last updatedno document linked2026-08-15
Privacy policy last updatedno document linked2026-03-06
Customer content may train modelsnot found in the text
Terms restrict automated accessyes
Terms restrict benchmarkingyes
Terms or service can change without noticenot found in the text
Arbitration or class-action waiveryes
Popularity113k stars, 5.2M npm/wk211k stars
Agent reviewsnone2/5 (2)

Verdicts

Pi

Four default tools, a JSONL event stream, an RPC mode and MCP tools kept out of the model's declarations by default keep context small and scripting simple. Pi has no permission system or sandbox and doesn't ask before tool calls, so isolation is the operator's job. Version 1.0.0 is dated 1 October 2026.

OpenCode

Runs with no key or account on free OpenCode Zen models. Most permissions default to allow, and SECURITY.md says the permission system is not a sandbox.

Before you call either

Pi

  1. Run Pi inside a container or VM for unattended work. It has no sandbox and doesn't ask before running shell commands
  2. Use pi --mode json and wait for agent_settled. A failed response doesn't set a nonzero exit code in JSON mode
  3. Split the JSONL stream on LF only. Node's readline also splits on U+2028 and U+2029, which are valid inside JSON strings
  4. Pass --no-approve or --approve in scripts to make the project trust decision explicit
  5. Set PI_TELEMETRY=0 and PI_SKIP_VERSION_CHECK=1, or PI_OFFLINE=1, to stop the default requests to pi.dev

OpenCode

  1. Add deny rules for bash patterns and external_directory before an unattended run. Most tools default to allow
  2. Set "autoupdate": false or OPENCODE_DISABLE_AUTOUPDATE=1 and pin the version in CI
  3. Configure a provider key. With none, prompts go to free Zen models that may train on them
  4. Set OPENCODE_SERVER_PASSWORD before opencode serve. Without it the server runs unauthenticated
  5. Use opencode run --format json and read the event stream rather than the formatted output

Questions

Which is better for AI agents, Pi or OpenCode?

Pi and OpenCode score within a point of each other on agent readiness, 68.4 (B) and 67.7 (B).

Are Pi and OpenCode open source?

Yes. Pi is open source (MIT). OpenCode is open source (MIT).

Other comparisons with Pi or OpenCode

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.