# openclaw vs opencode

> 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/openclaw-vs-opencode

## Programmable capabilities

| Column | openclaw | opencode | Marks differ |
|---|---|---|---|
| [Capability interface](https://ai-agents-review.com/column/capability-interface.md) | [3 s](https://ai-agents-review.com/cell/openclaw/capability-interface.md) | [4 s](https://ai-agents-review.com/cell/opencode/capability-interface.md) | yes |
| [Reusable computation](https://ai-agents-review.com/column/reusable-computation.md) | [3 s](https://ai-agents-review.com/cell/openclaw/reusable-computation.md) | [3 s](https://ai-agents-review.com/cell/opencode/reusable-computation.md) | no |
| [Capability transfer](https://ai-agents-review.com/column/capability-transfer.md) | [2 s](https://ai-agents-review.com/cell/openclaw/capability-transfer.md) | [2 s](https://ai-agents-review.com/cell/opencode/capability-transfer.md) | no |

## Evidence and memory

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

## Specialist collaboration

| Column | openclaw | opencode | Marks differ |
|---|---|---|---|
| [Specialist definition](https://ai-agents-review.com/column/specialist-definition.md) | [3 s](https://ai-agents-review.com/cell/openclaw/specialist-definition.md) | [3 s](https://ai-agents-review.com/cell/opencode/specialist-definition.md) | no |
| [Continuation](https://ai-agents-review.com/column/continuation.md) | [2 s](https://ai-agents-review.com/cell/openclaw/continuation.md) | [4 s](https://ai-agents-review.com/cell/opencode/continuation.md) | yes |
| [Coordination](https://ai-agents-review.com/column/coordination.md) | [3 s](https://ai-agents-review.com/cell/openclaw/coordination.md) | [2 s](https://ai-agents-review.com/cell/opencode/coordination.md) | yes |

## Execution controls

| Column | openclaw | opencode | Marks differ |
|---|---|---|---|
| [Confinement](https://ai-agents-review.com/column/confinement.md) | [0→3 [opt: sandbox.mode docker] s](https://ai-agents-review.com/cell/openclaw/confinement.md) | [1 s](https://ai-agents-review.com/cell/opencode/confinement.md) | yes |
| [Credential handling](https://ai-agents-review.com/column/credential-handling.md) | [2→3 [opt: sandbox docker (env LANG only)] s](https://ai-agents-review.com/cell/openclaw/credential-handling.md) | [1 s](https://ai-agents-review.com/cell/opencode/credential-handling.md) | yes |
| [Budget enforcement](https://ai-agents-review.com/column/budget-enforcement.md) | [1 s](https://ai-agents-review.com/cell/openclaw/budget-enforcement.md) | [1→2 [opt: per-agent steps] s](https://ai-agents-review.com/cell/opencode/budget-enforcement.md) | yes |

## Product integration

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

## Operations and verification

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

## Rationales

### Capability interface

- openclaw: Plugin registerTool plus MCP; per-agent layered allow/deny; host-executed tool interface not shown (level 4 unmet)
- opencode: Plugins (npm/local/SDK) plus MCP; denied/hidden filtering; SDK plugins host-executed in-process; Code Mode defers catalog by default

### Reusable computation

- openclaw: Cron script payloads re-run as scheduled units; typed params absent by default. unresolved: Lobster run records (engine out of tree)
- opencode: Default-on automations re-run code/shell on triggers with runCount/lastOutput; args untyped JSON (level 4 unmet)

### Capability transfer

- openclaw: ClawHub install; missing binary disables skill; no fork-vs-fresh transfer choice (level 3 unmet)
- opencode: Skills from dirs/paths/URLs; session fork exists; plugin/MCP executables not dependency-checked (level 3 unmet)

### Durable evidence

- openclaw: Default pruning policy exists, but in-place UPDATE and suffix replace rewrite records (level 3 unmet)
- opencode: Messages with tool parts in SQLite; revert deletes rows; no message retention policy (level 3 unmet)

### Context recovery

- openclaw: Ungated sessions_history/sessions_search over kept rows; spill paths break on restart, no auto injection (level 4 unmet)
- opencode: Release: summary plus re-reading saved tool-output paths; session search/read only under sqlite_fts

### Memory maintenance

- openclaw: Default nightly dreaming merges/supersedes with 25% loss guard; flush exhausted after 3 failures; versioned skill restore
- 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)

### Specialist definition

- openclaw: agents.entries set model, tools policy, sandbox, prompt files; L4 unmet: tool policy not intersected, ACP path skips admission
- opencode: Config/.md agents set model, prompt, permission rules; L4 unmet: parent agent denies not intersected (plan→general edits)

### Continuation

- openclaw: Session mode is a per-call choice (R1) keeping the child for follow-ups; in-flight children settled as errors; follow-up after restart unresolved
- opencode: Durable child session resumed at boot; follow-ups to running child go through SQLite session_inbox (read in code)

### Coordination

- openclaw: Depth 5, 5 children per requester, cascade cancel; L4 unmet: sessions_send denied to subagents, no tree-wide budget
- opencode: Depth 1 enforced, per-job cancel; L3 unmet: no subagent concurrency cap found (Code Mode caps dev-only, codemode only)

### Confinement

- openclaw: Default off. Docker sandbox confines exec and file tools (sandboxed read/write/edit, src/agents/core-coding-tools.ts:19-21), network none; auxiliary-process confinement unresolved
- opencode: Allow/ask/deny ruleset (allow *, *.env ask); no OS sandbox in release or dev builds

### Credential handling

- openclaw: Host exec env minus denylist, *_API_KEY passes; Docker sandbox env defaults to LANG only with secret-name blocking
- opencode: Full env inherited, plaintext credential DB; only *.env read-tool ask and host per-session env replacement

### Budget enforcement

- openclaw: Only 48 h timeout, repeat guard and USD display; deep-research plugin counters not a run budget
- opencode: steps unset by default, cost reporting only; setting the named per-agent steps key gives a level-2 work limit (R3)

### Embedding interfaces

- openclaw: Typed Gateway WS RPC with approval methods plus an ACP stdio bridge shipped in-tree as a second transport (R10)
- opencode: In-process SDK plus HTTP API with typed events, prompt/interrupt/fork/inbox, permission replies and an ACP agent, all in release

### Declarative configuration

- openclaw: Zod strictObject rejects unknown keys by default, with cross-checks; a `config.schema` RPC serves a machine-readable schema
- opencode: Effect Schema type decode, but `onExcessProperty: "ignore"`; a malformed document is dropped with a warning

### Durable execution

- openclaw: Asynchronous dispatch outlives the client; idempotency keys on input; steer serializes; restart resumes with an explicit no-replay rule
- opencode: Durable inbox outlives disconnect; one execution per session; boot sweep resumes claims, documented as at-least-once

### Service dependencies

- openclaw: Resident Gateway daemon by default, hosting cron, dreaming and channels while idle
- opencode: Clients ensure a local `opencode serve --service` process that stays resident when idle

### Execution records

- openclaw: Terminal failed/aborted phases with codes; optional OTel via in-tree extensions/diagnostics-otel (R12); not tamper-evident
- opencode: Typed step/tool/execution failure events, optional OTLP. Revert and delete remove rows, so not protected

### Result checks

- openclaw: `before_agent_finalize` forces up to 3 revisions, fails open, then releases
- opencode: Built-in `/goal` judge re-prompts with stated caps (50 rounds, 3 stalls) and pauses; the caps are constants, not configurable per check
