Marks / Runtime
opencode
Programmable capabilities
- 4 Capability interface Plugins (npm/local/SDK) plus MCP; denied/hidden filtering; SDK plugins host-executed in-process; Code Mode defers catalog by default
Review finding
Built in. One registry is fed by built-in plugins, npm or local plugins, SDK plugins and MCP. Tools carry input and output schemas. By default most tools sit behind one Code Mode
executetool; denyingexecuteexposes them directly. Plugins run in-process, and onlytool.execute.beforecan reject a call. P77P78P79P80P81 - 3 Reusable computation Default-on automations re-run code/shell on triggers with runCount/lastOutput; args untyped JSON (level 4 unmet)
Review finding
Built in. Automations are SQLite rows on by default (
automations: falsedisables them). Each runs a prompt, shell command or Code Mode program on a timer, cron, one-shot or MCP-event trigger; code actions are capped at 30 s and 32 KiB of output. Skills, commands and plugins give file-based reuse. Code Mode calls are not stored otherwise. P82P83P84 Note P-7 - 2 Capability transfer Skills from dirs/paths/URLs; session fork exists; plugin/MCP executables not dependency-checked (level 3 unmet)
Review finding
Built in. Skills are discovered from
.opencode,.claudeand.agentsdirectories and from configured paths or URLs; MCP-provided skills are dev-only. Subagents start with fresh context but inherit the parent session's permissions and metadata. Sessions fork, and experimentally export or import. Plugin and MCP executables must be installable on the target. P85P86P87P88P89P90
Evidence and memory
- 2 Durable evidence Messages with tool parts in SQLite; revert deletes rows; no message retention policy (level 3 unmet)
- 2 ↑3 Context recovery dev-only: sqlite_fts flag Release: summary plus re-reading saved tool-output paths; session search/read only under sqlite_fts
- 0 ↑1 Memory maintenance dev-only: home_memory 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 collaboration
- 3 Specialist definition Config/.md agents set model, prompt, permission rules; L4 unmet: parent agent denies not intersected (plan→general edits)
Review finding
Built in. Agent records (model, prompt/instructions, mode, steps, ordered permission rules) come from config, agent
.mdfiles or plugins; built-ins aregeneralandexplore. Permission rules double as tool scoping. A child gets its own agent's rules plus the parent session's permissions; the parent agent's denies are not intersected C95–C98; Note C-7. - 4 Continuation Durable child session resumed at boot; follow-ups to running child go through SQLite session_inbox (read in code)
- 2 Coordination Depth 1 enforced, per-job cancel; L3 unmet: no subagent concurrency cap found (Code Mode caps dev-only, codemode only)
Execution controls
- 1 Confinement Allow/ask/deny ruleset (allow *, *.env ask); no OS sandbox in release or dev builds
Review finding
No OS sandbox in release or dev builds; shell, MCP stdio and file tools run as the user. An ordered allow/ask/deny ruleset defaults to allow
*, external directories included;*.envreads ask. Shell commands are parsed for paths. Remote workspaces exist only if the embedder supplies a provider. A child agent's rules are not intersected with its parent's denies. X96X97X98X99X100 - 1 Credential handling Full env inherited, plaintext credential DB; only *.env read-tool ask and host per-session env replacement
Review finding
Local shell inherits the server's full
process.env, or a per-session replacement the host sets viaPUT /session/:id/environment. MCP stdio servers inherit the env. Stored credentials are plaintext JSON in the 0600 SQLite DB, which the shell can read. The*.envask rule covers thereadtool, not shellcat. No output redaction. X96X101X102X103X104 - 1 ↑2 Budget enforcement opt: per-agent steps steps unset by default, cost reporting only; setting the named per-agent steps key gives a level-2 work limit (R3)
Review finding
Per-agent
steps(unset by default) forces a final tool-less step; it counts per agent loop and does not include descendants. No local $/token cap: cost is computed after each call from the provider-reported figure, else the models.dev catalog. OpenCode Console spend limits are enforced provider-side and surface as errors. Goal loop capped at 50 rounds. X105X106X107X108X109
Product integration
- 4 Embedding interfaces In-process SDK plus HTTP API with typed events, prompt/interrupt/fork/inbox, permission replies and an ACP agent, all in release
- 2 Declarative configuration Effect Schema type decode, but
onExcessProperty: "ignore"; a malformed document is dropped with a warning - 4 Durable execution Durable inbox outlives disconnect; one execution per session; boot sweep resumes claims, documented as at-least-once
Operations and verification
- R * Service dependencies Clients ensure a local
opencode serve --serviceprocess that stays resident when idle - 3 Execution records Typed step/tool/execution failure events, optional OTLP. Revert and delete remove rows, so not protected
- 3 Result checks Built-in
/goaljudge re-prompts with stated caps (50 rounds, 3 stalls) and pauses; the caps are constants, not configurable per checkReview finding
Tool inputs are decoded against their schema (error asks the model to retry) and outputs against declared output schemas. Only
tool.execute.beforehooks can reject. Built-in/goalLLM judge (≤50 rounds, 3 stalls). Schema-checked Code Modeagent()exists only behind a flag that is off in releases. No LSP or test gate. O88O89O90O92O93O95
Reproducibility
- Repository
- https://github.com/anomalyco/opencode
- Branch
- dev
- Exact revision
2204311ec6e966db8d67988ab3638ad95a811a46- Commit date
- 2026-11-28T18:31:57+08:00
Metadata
- Exact revision
2204311ec6e966db8d67988ab3638ad95a811a46(branchdev), committed 2026-11-28T18:31:57+08:00- Version (source)
- 2.4.1 (root
package.json,packages/cli,packages/sdk, …; nopackages/opencodein this V2 tree) M22 - License
- MIT (
LICENSE;packages/sdk/package.json) M22 - Audited component / deployment
packages/core,server/protocol,sdk,cli,plugin,codemode,schema. Default: CLI starts/joins a managed loopback background service with SQLite; alt: in-process@opencode/sdkhost (no port,:memory:DB). Release build treated as default; several features are dev-build-only M23M24- Supported runtime platforms
- Release binaries linux arm64/x64 (glibc, musl, non-AVX2), darwin arm64/x64, win32 arm64/x64; Bun 1.4.4 (Node variants exist); workerd SDK entry M22M25
- Evidence coverage
- Deep: tools, permissions, agents, plugins, sessions/compaction/subagents, restart, MCP stdio, config, flags, server, SDK. Skimmed: projector, Code Mode runtime, ACP, observability. Not:
packages/ai(282 files), TUI/app/desktop, Rust PTY daemon,cli-rs
Pinned external dependencies (capability-supplying)
- Package@version
[email protected]- Role
- runtime framework
- Lockfile / source
- root
package.jsoncatalog M43
- Package@version
@modelcontextprotocol/[email protected](locally patched),core/server2.4.0- Role
- MCP
- Lockfile / source
bun.lock:1034,1737M43
- Package@version
[email protected](out of tree)- Role
- Code Mode interpreter [D for isolation]
- Lockfile / source
bun.lock:3933M43
- Package@version
[email protected]over@effect/sql-sqlite-*@4.1.0;@ai-sdk/[email protected];[email protected](desktop only)- Role
- storage; providers; desktop
- Lockfile / source
bun.lock:2997;packages/desktop/package.json:51M43
Specialist collaboration: Supporting table: parent→child authority
Operations and verification: Notes
- Finished process
session.execution.succeeded- Delivered answer
- Message
- Structural validity
- Tool I/O schemas
- Task correctness
- Opt-in only (see below)
Operations and verification: Notes
- Mechanism
/goaljudge O90- After the check fails
- Pauses after 50 rounds or 3 stalls; a goal armed by an earlier process returns paused.
Part A: platforms, clients, IDE, messaging
- Native platforms
- Linux, macOS, Windows binaries M25
- Terminal / web / desktop clients
- OpenTUI TUI, web app served by the service, Electron desktop (all outside audited component) A27
- IDE & coding integrations
- VS Code extension
sdks/vscode(outside audited component); ACP agent inpackages/cli/src/acpA28 - Messaging channels
- Release build: none. Slack threads + GitHub watches via OpenCode Console behind
console_watchesflag (off in releases) A29
Part B: voice/media, onboarding/routing, fleet administration
- Voice / media
- Voice transcription; image and video generation tools; media blob storage A62
- Onboarding & session routing
- Managed background service elected once per user, restart on version mismatch; pairing links issue session tokens A63A64
- Fleet administration
- macOS MDM managed-preferences plist; org policies via Console with guarded plugins; enterprise share URL A65; remote
machines(dev-flag)
Source/doc conflicts
Coordinator re-checks
- Claim
- No OS sandbox code
- Lines read
grep -rliE 'landlock|seatbelt|sandbox-exec|bwrap|seccomp'overpackages/**/*.{ts,rs}- Result
- No hits