Files
obra__episodic-memory/docs/OPENCODE.md
Jesse Vincent 30916f8cad feat(harness): add Cursor (#113) and opencode (#117) support
Adds Cursor (live transcripts + opt-in state.vscdb backfill) and opencode (DB->JSONL export) as harnesses, following the existing Codex pattern. opencode summarization is fixed to route via transcript text instead of a doomed claude --resume, and hasConversationContent recognizes opencode_message lines. Harness union is 'claude'|'codex'|'cursor'|'opencode'. Also pins conversation timestamps to en-US/UTC in every renderer (#130) and restores valid YAML in the search agent frontmatter (#153).

Co-authored-by: vicnaum <vicnaum@users.noreply.github.com>

Co-authored-by: slandau3 <slandau3@users.noreply.github.com>

Co-authored-by: arimu1 <arimu1@users.noreply.github.com>

Claude-Session: https://claude.ai/code/session_0112vdwZphiWzfCYfaXMes4C
2026-09-08 18:47:47 +00:00

1.9 KiB

OpenCode Support

Episodic Memory supports opencode by exporting sessions from opencode's SQLite database into generated JSONL transcripts, then indexing those transcripts with the same archive and search pipeline used for Claude Code and Codex.

Install

Install the package globally or make it available to opencode:

npm install -g github:obra/episodic-memory

Then add the server plugin to your opencode config:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["episodic-memory"]
}

The package exposes an opencode server plugin at episodic-memory/server. opencode discovers that entrypoint automatically from package metadata when the package is listed in plugin.

Sync

The plugin runs this command in the background when an opencode session becomes idle:

episodic-memory sync --background --only opencode --summary-limit 10

Manual sync works the same way:

episodic-memory sync --only opencode

By default, episodic-memory reads:

~/.local/share/opencode/opencode.db

Override the database path when needed:

export EPISODIC_MEMORY_OPENCODE_DB_PATH=/path/to/opencode.db

Generated transcripts are written under:

~/.config/superpowers/opencode-transcripts

Override that directory with:

export EPISODIC_MEMORY_OPENCODE_TRANSCRIPT_DIR=/path/to/generated-transcripts

Doctor

Check the local opencode integration with:

episodic-memory doctor opencode

The doctor verifies the opencode version, package plugin configuration, MCP registration, SQLite database path, generated transcript directory, and background sync log path.

MCP

Use the existing MCP server with opencode so agents can search indexed memory:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "episodic-memory": {
      "type": "local",
      "command": ["episodic-memory-mcp-server"],
      "enabled": true
    }
  }
}