Skip to content

Technical details

The record, and what it is not.

This page is the architecture, the comparison, and the limitations. The sales page is the short version. Nothing here is hidden from it; it is just no longer standing in front of the price.

Who it is for

Developers running long coding-agent sessions in OpenCode.

For people who want each new session, and each session after a compaction, to start from what was decided, done, failed and blocked. Claude Code, Codex, Muse, Cursor, Kiro and GitHub Copilot work too, through the bundled MCP server.

Who it is not for

How it works

Code operations and persistent state, connected locally.

Host adapter

OpenCode uses the native plugin. Other compatible coding agents call the bundled MCP server. The adapter provides tool access and access to supported session histories.

Structural core + ast-grep

The shared structural core and bundled ast-grep provide AST and text search, bounded reads, and guarded preview/apply operations on project files.

State engine

A small Rust binary turns observed session activity into project facts and updates them when later events supersede earlier information.

Local state and capsule

Project facts stay local through .openstate/, which may be a directory, a symlink or a local pointer file. OpenCode adds the capsule at session start and after compaction; MCP clients request it on demand. openstate_why shows a fact’s provenance.

Three problems it addresses

Long agent sessions lose what they learned.

ProblemWhat OpenState recordsWhere the agent sees it
The agent re-runs a command that already failed in an earlier session.Each failed command.failed_attempts in the capsule; openstate_report; openstate_report_timeline shows which session it failed in.
After a compaction or a restart, the agent re-reads files to work out what it was doing.The objective, recent decisions, the files being worked on, uncommitted changes, and whether a test has passed since the last edit.The capsule, added to the context at the start of the session and after each compaction.
The agent retries an approach that was already rejected.Decisions: messages that give a reason (“because …”), recorded with that reason.decisions in the capsule; openstate_why shows where a decision came from.

Every install carries 14 state tools for the record (state, capsule, report, why, assess, checkpoint, and the rest) and 22 structural tools. The tool inventory is on the code tools page.

How it compares

Recorded from events, not written by the model.

ApproachWhat is keptWho writes itWhen the agent sees itGoes stale?
Compaction summaryA prose summary of the conversation so farThe model, when the context fills upIn the same session, after compaction; a new session starts without itIt is rewritten at each compaction; details the model left out are gone
A notes file (AGENTS.md, a memory markdown file)Whatever someone wrote thereYou, or the agent when told toEvery session, in fullYes, unless someone keeps editing it
Agent memory tools (agent-written notes, built-in memory)Notes the model chose to saveThe model, when it decides toWhen the agent reads themYes, unless the agent revisits them
Transcript search and event logsEverything that was said and runThe host, automaticallyWhen the agent searchesNo, but it is history, not current state; the agent has to work out what still holds
Telling the model to rememberNothing outside the context—Until the context is compacted or the session ends—
OpenStateDecisions, failed and completed commands, blockers, the objective, test status since the last edit, changed filesThe engine, from the session's events, with no model in the loopOpenCode: in the capsule at the start of every session and after each compaction. Other hosts: when the agent calls openstate_capsuleNo: a fact is replaced or closed when a later event supersedes it

Known weaknesses

What the record does not cover.

The structural tools have their own costs — extra calls for a small edit, syntax matching rather than types — on the code tools page.

Principles

01

State, not story

A record of what is true now, compiled from events, not a summary written by a model.

02

Local only

No runtime network calls except license checks, no telemetry. State lives in your repository.

03

Deliberate persistence

State is written on checkpoint, when OpenCode closes, and when the engine’s input ends.

04

Sold per developer, tried free

$129 once for every 0.x release, or $10 a month, through Stripe. All sales are final. The docs, skill, installer and plugin are MIT.

Commercial embedding licenses available — sales@deltazerolabs.dev