# opencode vs pi

> Levels are per column and must not be summed, averaged or ranked. A level states which written criterion the runtime's source meets. It is not a measure of quality or task success. Higher is not always preferable.

Source: "Agent runtime comparison: ten open-source agent runtimes, source review", study of 2026-11-28. Mark notation: `3` is the level in the default deployment; `1→4 [opt: …]` is level 1 by default and level 4 in the named configuration; `s` source-verified, `d` documented or test only. Service dependencies are classes (E embedded, O on demand, R resident service, X external server required), not levels.

Page: https://ai-agents-review.com/compare/opencode-vs-pi

## Programmable capabilities

| Column | opencode | pi | Marks differ |
|---|---|---|---|
| [Capability interface](https://ai-agents-review.com/column/capability-interface.md) | [4 s](https://ai-agents-review.com/cell/opencode/capability-interface.md) | [3→4 [config: activate built-in tool_search] s](https://ai-agents-review.com/cell/pi/capability-interface.md) | yes |
| [Reusable computation](https://ai-agents-review.com/column/reusable-computation.md) | [3 s](https://ai-agents-review.com/cell/opencode/reusable-computation.md) | [2 s](https://ai-agents-review.com/cell/pi/reusable-computation.md) | yes |
| [Capability transfer](https://ai-agents-review.com/column/capability-transfer.md) | [2 s](https://ai-agents-review.com/cell/opencode/capability-transfer.md) | [2 d](https://ai-agents-review.com/cell/pi/capability-transfer.md) | no |

## Evidence and memory

| Column | opencode | pi | Marks differ |
|---|---|---|---|
| [Durable evidence](https://ai-agents-review.com/column/durable-evidence.md) | [2 s](https://ai-agents-review.com/cell/opencode/durable-evidence.md) | [2 s](https://ai-agents-review.com/cell/pi/durable-evidence.md) | no |
| [Context recovery](https://ai-agents-review.com/column/context-recovery.md) | [2→3 [dev-only: sqlite_fts flag] s](https://ai-agents-review.com/cell/opencode/context-recovery.md) | [2 s](https://ai-agents-review.com/cell/pi/context-recovery.md) | yes |
| [Memory maintenance](https://ai-agents-review.com/column/memory-maintenance.md) | [0→1 [dev-only: home_memory] s](https://ai-agents-review.com/cell/opencode/memory-maintenance.md) | [0 s](https://ai-agents-review.com/cell/pi/memory-maintenance.md) | yes |

## Specialist collaboration

| Column | opencode | pi | Marks differ |
|---|---|---|---|
| [Specialist definition](https://ai-agents-review.com/column/specialist-definition.md) | [3 s](https://ai-agents-review.com/cell/opencode/specialist-definition.md) | [1 s](https://ai-agents-review.com/cell/pi/specialist-definition.md) | yes |
| [Continuation](https://ai-agents-review.com/column/continuation.md) | [4 s](https://ai-agents-review.com/cell/opencode/continuation.md) | [0→3 [alt: pi-durable checkpointed child tasks] s](https://ai-agents-review.com/cell/pi/continuation.md) | yes |
| [Coordination](https://ai-agents-review.com/column/coordination.md) | [2 s](https://ai-agents-review.com/cell/opencode/coordination.md) | [0→1 [alt: pi-durable] s](https://ai-agents-review.com/cell/pi/coordination.md) | yes |

## Execution controls

| Column | opencode | pi | Marks differ |
|---|---|---|---|
| [Confinement](https://ai-agents-review.com/column/confinement.md) | [1 s](https://ai-agents-review.com/cell/opencode/confinement.md) | [0→2 [alt: Docker / OpenShell / Gondolin (documented)] d](https://ai-agents-review.com/cell/pi/confinement.md) | yes |
| [Credential handling](https://ai-agents-review.com/column/credential-handling.md) | [1 s](https://ai-agents-review.com/cell/opencode/credential-handling.md) | [1 s](https://ai-agents-review.com/cell/pi/credential-handling.md) | no |
| [Budget enforcement](https://ai-agents-review.com/column/budget-enforcement.md) | [1→2 [opt: per-agent steps] s](https://ai-agents-review.com/cell/opencode/budget-enforcement.md) | [1→2 [alt: pi-durable maxTurns] s](https://ai-agents-review.com/cell/pi/budget-enforcement.md) | no |

## Product integration

| Column | opencode | pi | Marks differ |
|---|---|---|---|
| [Embedding interfaces](https://ai-agents-review.com/column/embedding-interfaces.md) | [4 s](https://ai-agents-review.com/cell/opencode/embedding-interfaces.md) | [4 s](https://ai-agents-review.com/cell/pi/embedding-interfaces.md) | no |
| [Declarative configuration](https://ai-agents-review.com/column/declarative-configuration.md) | [2 s](https://ai-agents-review.com/cell/opencode/declarative-configuration.md) | [1 s](https://ai-agents-review.com/cell/pi/declarative-configuration.md) | yes |
| [Durable execution](https://ai-agents-review.com/column/durable-execution.md) | [4 s](https://ai-agents-review.com/cell/opencode/durable-execution.md) | [2→3 [alt: pi-durable] s](https://ai-agents-review.com/cell/pi/durable-execution.md) | yes |

## Operations and verification

| Column | opencode | pi | Marks differ |
|---|---|---|---|
| [Service dependencies](https://ai-agents-review.com/column/service-dependencies.md) | [R (+E alt: in-process SDK) s](https://ai-agents-review.com/cell/opencode/service-dependencies.md) | [E s](https://ai-agents-review.com/cell/pi/service-dependencies.md) | yes |
| [Execution records](https://ai-agents-review.com/column/execution-records.md) | [3 s](https://ai-agents-review.com/cell/opencode/execution-records.md) | [2 s](https://ai-agents-review.com/cell/pi/execution-records.md) | yes |
| [Result checks](https://ai-agents-review.com/column/result-checks.md) | [3 s](https://ai-agents-review.com/cell/opencode/result-checks.md) | [2 s](https://ai-agents-review.com/cell/pi/result-checks.md) | yes |

## Rationales

### Capability interface

- opencode: Plugins (npm/local/SDK) plus MCP; denied/hidden filtering; SDK plugins host-executed in-process; Code Mode defers catalog by default
- pi: Extensions, built-in MCP client, host-registered SDK tools (R8), per-session set; tool_search registered but inactive by default

### Reusable computation

- opencode: Default-on automations re-run code/shell on triggers with runCount/lastOutput; args untyped JSON (level 4 unmet)
- pi: Skills with scripts persist; codemode scripts not saved; pi-durable journal replay is not unit re-run (level 3 unmet)

### Capability transfer

- opencode: Skills from dirs/paths/URLs; session fork exists; plugin/MCP executables not dependency-checked (level 3 unmet)
- pi: Pi package install (npm/git/local) documented [D]; fork/clone exist; no dependency checking (level 3 unmet)

### Durable evidence

- opencode: Messages with tool parts in SQLite; revert deletes rows; no message retention policy (level 3 unmet)
- pi: Append-only JSONL trees with tool calls; no retention policy, manual delete only (level 3 unmet)

### Context recovery

- opencode: Release: summary plus re-reading saved tool-output paths; session search/read only under sqlite_fts
- pi: Originals in JSONL; recovery via file lists and temp-file paths only; no transcript search tool (level 3 unmet)

### Memory maintenance

- opencode: Release: none. Dev home_memory uses plain dirs edited with file tools (L2 unmet), so its daily merge job cannot lift it past 1 (rule 3)
- pi: No learned-memory facility and no maintenance instruction; AGENTS.md and skills are guidance files

### Specialist definition

- opencode: Config/.md agents set model, prompt, permission rules; L4 unmet: parent agent denies not intersected (plan→general edits)
- pi: Subagents exist only as shipped example extension; example code does not count toward B

### Continuation

- opencode: Durable child session resumed at boot; follow-ups to running child go through SQLite session_inbox (read in code)
- pi: No subagents in core CLI (example only); pi-durable checkpointed children with restart limit 5

### Coordination

- opencode: Depth 1 enforced, per-job cancel; L3 unmet: no subagent concurrency cap found (Code Mode caps dev-only, codemode only)
- pi: No subagents in core CLI; pi-durable children and signals exist; unresolved: pi-durable depth/concurrency caps, cancellation

### Confinement

- opencode: Allow/ask/deny ruleset (allow *, *.env ask); no OS sandbox in release or dev builds
- pi: No approvals or OS boundary in the CLI; documented alternative deployments count at B but are capped at 2 (rule 1)

### Credential handling

- opencode: Full env inherited, plaintext credential DB; only *.env read-tool ask and host per-session env replacement
- pi: Full env to bash; only inheritEnv:false for MCP and !command keychain lookups; L2 unmet: no denylist

### Budget enforcement

- opencode: steps unset by default, cost reporting only; setting the named per-agent steps key gives a level-2 work limit (R3)
- pi: CLI reports usage only with a 3-retry cap; the pi-durable stack enforces a maxTurns work limit when set (R3); no cost admission

### Embedding interfaces

- opencode: In-process SDK plus HTTP API with typed events, prompt/interrupt/fork/inbox, permission replies and an ACP agent, all in release
- pi: In-process `createAgentSession` (with customTools) plus RPC JSONL with prompt/steer/follow_up/abort/fork; typed events

### Declarative configuration

- opencode: Effect Schema type decode, but `onExcessProperty: "ignore"`; a malformed document is dropped with a warning
- pi: Settings files explicitly not validated at runtime despite published schemas; only `models.json` is type-checked

### Durable execution

- opencode: Durable inbox outlives disconnect; one execution per session; boot sweep resumes claims, documented as at-least-once
- pi: CLI rejects concurrent prompts; orphaned calls get only synthetic transform-time errors, not recorded. pi-durable resumes or settles failed; unresolved: disconnect

### Service dependencies

- opencode: Clients ensure a local `opencode serve --service` process that stays resident when idle
- pi: Single Node process, no daemon or DB; MCP and fd/rg run as children

### Execution records

- opencode: Typed step/tool/execution failure events, optional OTLP. Revert and delete remove rows, so not protected
- pi: JSONL includes tools, failures and retries, but the telemetry contract ships no exporter, so level-3 optional telemetry is unmet

### Result checks

- opencode: Built-in `/goal` judge re-prompts with stated caps (50 rounds, 3 stalls) and pauses; the caps are constants, not configurable per check
- pi: Extension hooks can block or force another turn, with no stated cap; arguments are validated structurally
