Local-first, automatic persistent memory plugin for OpenCode: recalls relevant facts and session summaries on every turn, stores decisions and preferences as local markdown with CPU embeddings, checkpoints session compactions, and provides a zero-token Memory Manager in the TUI and OpenCode Desktop.
| OpenCode Desktop | OpenCode TUI |
|---|---|
![]() |
![]() |
| View full size | View full size |
Note: Previews were rendered in headless Chromium via Playwright from the plugin's actual Desktop (dist/gui-experimental.cjs) and TUI (tui.ts) UI code using synthetic fixture data and a simulated host frame, rather than captured from a live OpenCode window or terminal.
Now available in OpenCode Desktop as well as the TUI. The persistent Memory side panel (side-by-side at 640px and wider, or list-to-detail with a Back button in narrow panels) lets you search stored memories, add and edit facts, pin or unpin core memories, delete entries, import history, and resync the index without a model turn. Press Ctrl+Shift+M to open or focus the panel, or Ctrl+Alt+M to toggle it. When no session is active, the manager opens in a fallback dialog.
One global OpenCode V2 plugin entry loads the server, TUI, and Desktop integration together. Both interfaces use the same local memory files and index; see Installation for setup.
This plugin started as a folder of markdown files and CLI scripts wired together through instructions in AGENTS.md. That setup worked on one machine, but every new environment needed the same prompt rules, and searching memory from the chat meant spending model tokens on a script call.
opencode-local-memory packages that workflow into a self-contained OpenCode plugin:
- Human-readable markdown is the source of truth: Atomic facts live in
topics/*.mdand session summaries live insessions/*.md. You can read, edit, or back them up like any ordinary text files. - Local CPU embeddings (
vectors.json): Uses@huggingface/transformers(Xenova/all-MiniLM-L6-v2) inside the OpenCode process to embed and search entries on CPU without external servers or API keys. - Self-contained lifecycle hooks: The plugin's
contexthook recalls relevant memories for each prompt and injects the storage and recall rules directly into<local-memory-plugin>, so you do not need customAGENTS.mdinstructions. - Zero-token TUI search & store: Browse, filter, and add memories directly inside OpenCode via
/memoryand/memory-addwithout making an LLM request.
| Feature | Details |
|---|---|
| Local-first, zero-token TUI & CPU embeddings | Runs 384-dimensional Xenova/all-MiniLM-L6-v2 embeddings locally on CPU and provides a zero-token /memory TUI browser with no cloud API keys or external servers |
| Human-readable markdown source of truth | Stores atomic facts in topics/*.md and session checkpoints in sessions/*.md so every memory stays plain, editable markdown |
Automatic per-turn recall (context hook) |
Before each model call, injects core: true pinned invariants and runs hybrid semantic + field-weighted Okapi BM25 search (vectors.json, with project scoping and umbrella-root detection) against the user's prompt |
Atomic fact storage & lifecycle (memory_store, memory_delete, /memory-add, /memory-delete) |
Appends or updates blocks in topics/<topic>.md, auto-increments sequential IDs (<prefix>-<nnn>), prunes supersedes IDs, registers new topic files in memory.md, and writes vectors.json atomically |
Automatic session checkpoints (compaction hook) |
Captures distilled session summaries (sessions/YYYY-MM-DD_<slug>-<NN>.md) automatically on session compaction or via memory_checkpoint and indexes them into vectors.json |
Interactive /memory TUI modal |
Wide (80% default, configurable via dialogWidth) split-pane browser with colored filter pills (^t type, ^g topic, ^r mode, ^b import, ^l resync), instant 0ms lexical filtering refined by local vector similarity, and full session markdown preview |
Zero-token history & rule import (/memory-import) |
Imports existing AGENTS.md / CLAUDE.md rules into topics/*.md and compacted session summaries from opencode.db into sessions/*.md idempotently via /memory-import, ^b inside /memory, or npx @nandoblanco/opencode-local-memory import |
| Automatic first-run bootstrap | On a blank install, automatically creates ~/.config/opencode/memory (or $XDG_CONFIG_HOME/opencode/memory) with memory.md, starter topics/{preferences,decisions,environment,agent-behavior}.md, and sessions/README.md |
| Interactive fact management | Add and edit topic facts, pin or unpin core entries, and confirm deletion inside the TUI Manager; session checkpoint editing is read-only |
| OpenCode Desktop Manager | Persistent Memory side panel, query and project filters, fact editor, pin/unpin, delete, import, and resync through MemoryRpc; opens a fallback dialog when no session is active |
Install with OpenCode's native plugin CLI. OpenCode downloads the package from npm (or GitHub) into its own cache automatically and adds one entry to ~/.config/opencode/opencode.jsonc that loads the server hooks, agent tools, /memory TUI popup, and Desktop panel together (and scaffolds ~/.config/opencode/memory automatically on first run):
opencode plugin add @nandoblanco/opencode-local-memory
# Auto-update on startup and every 24 hours:
opencode plugin add @nandoblanco/opencode-local-memory@latest
# Or install directly from GitHub:
opencode plugin add github:nandoblanco/opencode-local-memoryAdd @nandoblanco/opencode-local-memory to "plugins" in the global ~/.config/opencode/opencode.jsonc (or project ./opencode.jsonc / ./.opencode/opencode.jsonc). OpenCode fetches the npm package automatically and loads its server, TUI, and Desktop parts from this single entry (no manual npm install or separate cli.json entry is required):
Run the package CLI once via npx to register the plugin in ~/.config/opencode/opencode.jsonc, scaffold a custom memory folder, optionally import existing AGENTS.md / opencode.db data, and pre-warm vectors.json:
npx @nandoblanco/opencode-local-memory install
# Or specify a custom memory folder:
npx @nandoblanco/opencode-local-memory install --dir ~/my-memoryFor development, use Node.js 26.4 or newer to meet the OpenTUI dependency's declared minimum. Clone this repository, run npm ci and npm run build:gui, then reference the package directory in opencode.jsonc (or place the directory inside ~/.config/opencode/plugins/ or .opencode/plugins/). The root overrides pin patched glob and minimatch versions for this repository's development dependencies; they do not alter the OpenCode host application's dependencies:
{
"plugins": ["file:///path/to/opencode-local-memory"]
}Once enabled, the plugin manages memory automatically during normal coding sessions:
- Automatic Storage & Lifecycle (
memory_store&memory_delete): When you state a preference or coding convention, make an architectural decision, uncover a non-obvious environment fact, or correct the agent, the model callsmemory_storebefore finishing its turn. When replacing or removing outdated facts, it updates entries in place viaid, prunes superseded entries viasupersedes, or callsmemory_delete. - Automatic Recall (
contexthook +memory_search): Thecontexthook injects pinnedcore: truememories and relevant prompt matches (scoped to the active project orglobal, with automatic nested-project detection from umbrella roots) before each turn. For broader lookups, the model callsmemory_search(hybrid,semantic, orgrep). - Automatic Checkpoints (
compactionhook +memory_checkpoint): The plugin writes numbered session summaries tosessions/YYYY-MM-DD_<slug>-<NN>.mdand indexes them intovectors.json.
- Interactive
/memorypopup: Run/memory(or/memory <query>) or pressCtrl+Pand selectSearch local memory (0 tokens).... - Direct zero-token storage (
/memory-add): Run/memory-add <topic> | <tags> | <fact>to append a fact and embed it intovectors.jsonimmediately without invoking the AI:/memory-add preferences | css, layout | Always verify layout changes with Playwright before reporting completion. - Direct zero-token deletion (
/memory-delete): Run/memory-delete <id>(supports comma-separated IDs) to remove outdated entries from their markdown source files andvectors.jsonimmediately:/memory-delete env-007, dec-002 - Import existing history (
/memory-import): Run/memory-import [limit](or press^binside/memory) to import existingAGENTS.md/CLAUDE.mdrules and past compacted session summaries fromopencode.dbwithout duplicating existing entries. - Custom keybind: Bind
local.memory.searchin~/.config/opencode/cli.json:{ "keybinds": { "local.memory.search": "ctrl+m" } }
Run /memory [query] or press Ctrl+Shift+M (Cmd+Shift+M on macOS) to open and focus the persistent Memory side panel. Ctrl+Alt+M (Cmd+Option+M) toggles the panel. Without an active session, these commands open a dialog instead. Titlebar and vertical-tab shortcuts also open the Manager.
The Desktop commands /memory-add, /memory-delete, and /memory-import call the server RPC methods without a model turn. /memory-add without pipe-separated arguments opens the fact editor. Desktop shortcuts are separate from the TUI keybindings below.
Type filters inline in the search bar or toggle them with clickable filter pills and keyboard shortcuts.
| Syntax | Description | Example |
|---|---|---|
term1 term2 |
Hybrid semantic (Xenova/all-MiniLM-L6-v2) + lexical search |
storefront grid cards |
/pattern/i or re:pattern |
Regular expression match across ID, tags, fact, and file path | /dec-01[0-9]/i |
type:topics / type:sessions / type:all |
Filter to atomic topic facts (topics/*.md) or session checkpoints (sessions/*.md) (type:facts, in:topics, in:sessions also work) |
type:sessions plugin |
topic:<slug> |
Filter to a specific topic file (topics/<slug>.md) |
topic:decisions self-contained |
project:<slug> |
Filter to a specific project scope (global, cms/<client>, git/<repo>, or repo name) |
project:acme calendar |
core:true or is:core |
Filter to pinned core memories (core: true) |
is:core |
| Key | Action |
|---|---|
Enter |
Copy the selected memory entry ([id] (file): fact) to the clipboard and close the popup |
Up / Down or Ctrl+K / Ctrl+J |
Move selection up or down (j/k also work when the Results List pane is focused) |
PageUp / PageDown or Ctrl+U / Ctrl+F |
Jump 6 items up/down (or scroll the right Preview pane by 8 lines when focused) |
Tab / Shift+Tab |
Switch focus between Search Input, Results List, and Preview Pane |
Ctrl+T |
Cycle entry type filter pill (all -> topics -> sessions) |
Ctrl+G |
Cycle topic file filter pill (all -> decisions -> preferences -> environment -> ...) |
Ctrl+R |
Cycle search mode pill (hybrid -> keyword -> regex) |
Ctrl+B |
Import existing AGENTS.md / CLAUDE.md rules and compacted opencode.db sessions |
Ctrl+L |
Force resync markdown files (topics/*.md + sessions/*.md) into vectors.json |
Ctrl+N / Ctrl+E |
Add a fact / edit the selected topic fact |
Ctrl+P |
Pin or unpin the selected topic fact as core |
Ctrl+D |
Request deletion; press again or press Enter to confirm |
Ctrl+S / Enter (in editor) |
Save the fact; Tab cycles fields and Space toggles the core field |
Esc |
Close popup |
When the plugin initializes, resolveMemoryDir() selects the active memory directory in this order:
- Explicit
directoryoption inopencode.jsonc/cli.json(supports~expansion) OPENCODE_MEMORY_DIRenvironment variable- Parent directory of
index.jsif bothmemory.mdandtopics/already exist there $XDG_CONFIG_HOME/opencode/memoryor~/.config/opencode/memory(default)
On startup and before any write or sync operation, ensureMemoryLayout(rootDir) checks the target directory. If memory.md, topics/, or sessions/ are missing, it creates the directory tree, writes memory.md and sessions/README.md, and initializes four starter topic files (preferences.md, decisions.md, environment.md, agent-behavior.md). No pre-existing files are overwritten.
Before each model turn, the server plugin's ctx.session.hook("context") handler inspects the conversation and appends a <local-memory-plugin> block to event.system:
- Dynamic topic discovery: Scans
topics/*.mdviagetTopicSlugs()and lists every available topic slug, instructing the model that passing any new slug tomemory_storewill create a new topic file automatically. - Automatic storage triggers: Instructs the model to call
memory_storein the same turn whenever:- The user states a preference, convention, or workflow rule
- An architectural, workflow, or design decision is made
- A non-obvious environment, path, port, or tooling fact is discovered
- A recurring pattern emerges
- The user corrects the model or repeats an instruction
- Global vs. project scope & pinned core memories (
normalizeProjectScope&getCoreMemories): Directs cross-project facts toproject: "global"(default) and project-specific facts to nested scopes (cms/<client>,git/<repo>, or repo name). When launched from an umbrella workspace root,detectProjectsFromText()detects referenced project names in the prompt (or falls back across nested scopes), andgetCoreMemories()pinscore: trueinvariants on every turn. - Per-prompt auto-recall: Extracts the latest user message (
extractLastUserText), runs a hybrid semantic + BM25 lexical search againstvectors.jsonwhen the prompt is at least 5 characters long, filters hits withscore >= minScore(default0.38, toptopK = 6), and injects matching facts directly into<local-memory-plugin>.
When a storage trigger fires (or when you run /memory-add or npx @nandoblanco/opencode-local-memory store), storeMemoryFact(rootDir, input) executes an atomic write-and-embed pipeline:
- Choosing an existing vs. new topic: The model checks the injected
Available topicslist. If the fact matches an existing category (preferences,decisions,environment,agent-behavior), it passes that slug. If the fact belongs to a new domain (for example,tools,sql, orfrontend-css-patterns), it passes a new kebab-case slug. - Automatic topic file creation: Normalizes the slug via
.toLowerCase().replace(/[^a-z0-9-_]/g, "-"). Iftopics/<slug>.mddoes not exist yet, the plugin creates it with a# <Slug>heading and appends- \topics/.md` - entriestomemory.md`. - Sequential ID generation & lifecycle (
nextTopicId&deleteMemoryEntry): Scans existing- id: <prefix>-<nnn>blocks intopics/<slug>.md, preserves the file's prefix convention (for example,dec-016increments todec-017, while a newtools.mdfile starts attools-001), and formats the new YAML-style entry block with today'sYYYY-MM-DDdate. Passing an existingidupdates that block in place, and passingsupersedes(or callingdeleteMemoryEntry) removes outdated IDs from their markdown source files automatically. - Immediate vector indexing: Embeds
fact + " " + tagsinto a 384-dimensional vector and writesvectors.jsonatomically (vectors.json.tmp.<pid>) so the fact is searchable on the very next turn.
storeSessionCheckpoint(rootDir, input) writes session summaries to sessions/YYYY-MM-DD_<slug>-<NN>.md in two ways:
- Model-initiated (
memory_checkpointtool): At the end of significant work sessions, the model passes aslug,title, and structured markdownsummary(What was built/fixed/decided,Key decisions,Problems solved,Outcome). - Automatic compaction (
compactionhook): When OpenCode compacts a conversation (ctx.session.hook("compaction")), the plugin derives a 4-word slug from the last active user prompt, writes a numbered checkpoint file, records.session-state, and callssyncVectors()so the session summary is indexed intovectors.json. - Idempotent rule & DB history import (
importExistingMemory): ScansAGENTS.md/CLAUDE.mdfiles (including@pathincludes) viaparseAgentsMarkdownRules()and reads OpenCode's SQLite database (session_v2/session_messageand V1session/message/part) read-only viaimportFromOpenCodeDb(), deduplicating by normalized fact fingerprint and**Session ID**so re-running/memory-importnever duplicates entries.
Checkpoint numbers (-01, -02, ...) auto-increment per YYYY-MM-DD_<slug> prefix so multiple checkpoints on the same day never collide.
opencode-local-memory uses Xenova/all-MiniLM-L6-v2, a 23 MB sentence-embedding model that converts any sentence into a 384-number vector representing its meaning:
const mod = await import("@huggingface/transformers");
const embed = await mod.pipeline("feature-extraction", "Xenova/all-MiniLM-L6-v2", { device: "cpu", dtype: "q8" });
const out = await embed(text, { pooling: "mean", normalize: true });
const vec = Array.from(out.data); // -> [0.021, -0.084, 0.112, ... 384 numbers]- Semantic vs. keyword matching: Exact keyword search (
grep) only matches shared characters. If you store "Always run backup.ps1 before editing" and later ask "how do we undo changes?", keyword search returns nothing because no words overlap. The embedding model places both sentences near each other in 384-dimensional space, so their dot product (dot(queryVec, entry.vector)) scores high even with zero shared words. - Model installation and local cache:
@huggingface/transformersis a regular npm dependency inpackage.jsonthat runs ONNX models on CPU without Python or an external inference server. The pipeline explicitly selectsdevice: "cpu"anddtype: "q8", retaining the same model and 384-dimensional vector format. On first use it downloads and caches the quantized model and tokenizer from Hugging Face. Later runs reuse the local cache. Upgrading from@xenova/transformerscan require a new model download because the library cache location changes; existingvectors.jsonfiles are preserved. - Incremental vector sync (
syncVectors): Parses alltopics/*.mdblocks andsessions/*.mdsummaries (with per-filemtimeMscaching inparsedFileCache) and compares each entry'sid,fact,tags,project, andcoreagainstvectors.json. Unchanged entries reuse their cached 384-dimensional vectors and serialized JSON lines; only new or modified entries run through the embedding pipeline. - Scoring formula (
searchMemory&computeLexicalScore):semanticScore: Dot product (cosine similarity on L2-normalized vectors) between the 384-number query vector and each stored entry vector (0.0to1.0), computed in plain JavaScript in under 2 milliseconds.lexicalScore:+0.35if the full lowercase query is an exact substring of the entry haystack (id + tags + fact + file), or up to+0.35using field-weighted Okapi BM25 (buildCorpusStats+computeLexicalScore) acrossid(3.0x),tags(2.5x),file(1.5x), andfact(1.0x) with stopword filtering.- Final score:
semanticScore + lexicalScoreinhybridmode (default),semanticScoreinsemanticmode, orlexicalScoreingrepmode.
- In-memory & cross-process caching:
loadCachedVectors()caches parsed entries in memory and validatesvectors.jsonviafs.statSync(vecFile).mtimeMsand resolved path (cachedRootDir), automatically reloading if another process or CLI command updatesvectors.json.queryVecCachekeeps an in-memory 128-entry FIFO cache of normalized query embeddings to avoid re-embedding repeated prompts.lastContextKeycaches the generated<local-memory-plugin>system block per(userText, cachedVersion)pair so duplicate hook invocations within the same turn do zero extra work.
- Wide modal layout (
applyDialogWidth&dialog.set):- Calls
context.ui.dialog.show(...)followed bycontext.ui.dialog.set({ size: "xlarge", centered: true })so the dialog opens wide without being reset to default width. - Inside
onMountandref,applyDialogWidth()walks upward fromrootRefto the outerabsolute-positioned dialog container and setswidth: "80%"(or your configureddialogWidth),maxWidth: "80%", andminWidth: 76.
- Calls
- Two-phase 0ms lexical + async hybrid search (
runSearch):- On every keystroke,
filterEntriesSync()runs synchronously in 0ms against the in-memoryvectors.jsonentries so the results list updates immediately with zero input lag. - When
modeis"hybrid"and the query is at least 2 characters long,runSearch()then awaitssearchMemory(rootDir, q, "hybrid", 50)(guarded by a monotonicsearchSeqcounter to discard stale async results) and refines the list with semantic vector similarity scores (score >= 0.22).
- On every keystroke,
- Split-pane layout & full session markdown preview:
- Renders interactive
Pillcomponents beneath the search bar fortype:<filter>(^t),topic:<slug>(^g),mode:<mode>(^r),import(^b), andresync(^l). - Splits the main body into a 44%-width left results list (entry ID, hybrid score, source file, and 1-line summary) and a 56%-width right preview pane (metadata card, search-term highlighted fact text, and full markdown file content via
readFullSessionMarkdown()whenever asessions/*.mdcheckpoint is selected).
- Renders interactive
Desktop uses the separately exported MemoryRpc contract in rpc.js / rpc.d.ts. Server setup registers query, store, remove, sync, importMemory, and getSessionMarkdown; these are RPC methods, not additional LLM tools. readSessionMarkdown() restricts previews to paths beneath the memory root that start with sessions/. The GUI source (gui.tsx, gui.css) builds to dist/gui-experimental.cjs with npm run build:gui.
| Tool Name | Required Inputs | Optional Inputs | Behavior |
|---|---|---|---|
memory_store |
topic, tags, fact |
id, supersedes, project (default global), core (boolean) |
Creates topics/<topic>.md if missing, registers it in memory.md, updates in place when id exists (or assigns the next <prefix>-<nnn> ID), prunes supersedes IDs, and updates vectors.json. |
memory_delete |
id |
(none) | Deletes one or more memory entries by ID (or comma-separated IDs) from topics/*.md or sessions/*.md and updates vectors.json. |
memory_search |
query |
mode (hybrid, semantic, grep), topN (default 8), project (all, global, or project slug), coreOnly (boolean) |
Searches topic facts and session checkpoints and returns ranked entries with scores, IDs, dates, file paths, tags, and facts. |
memory_checkpoint |
slug, title, summary |
project (default global), contextPct |
Writes sessions/YYYY-MM-DD_<slug>-<NN>.md, updates .session-state, and indexes the checkpoint into vectors.json. |
Local embedding, TUI browsing, and direct /memory-add, /memory-delete, and /memory-import commands use zero LLM tokens:
| Operation | Token Cost | Why |
|---|---|---|
Interactive /memory TUI modal (Ctrl+M) |
0 tokens | Reads vectors.json and sessions/*.md directly from disk and runs Xenova/all-MiniLM-L6-v2 locally on CPU without an LLM request |
Direct TUI fact storage & deletion (/memory-add, /memory-delete) |
0 tokens | Appends or deletes entries in topics/*.md and updates vectors.json locally in Node.js |
History & rule import (/memory-import, Ctrl+B) |
0 tokens | Parses AGENTS.md / CLAUDE.md rules and reads compacted opencode.db sessions directly via SQLite and local embeddings |
Automatic compaction checkpoint (compaction hook) |
0 extra turn tokens | Captures the existing compaction summary event and indexes it locally into sessions/*.md and vectors.json |
Standalone CLI (npx @nandoblanco/opencode-local-memory ...) |
0 tokens | Runs directly in Node.js outside the model turn |
| Desktop Manager and RPC operations | 0 tokens | Queries and updates local memory through MemoryRpc without a model turn |
Per-turn auto-recall (context hook) & agent tools |
Variable system/schema and recalled-content tokens | Injects instructions, pinned core memories, and matching facts (score >= 0.38, max topK = 6); cost grows with their content and the selected model's tokenizer |
~/.config/opencode/memory/
├── memory.md # Global index of topic files
├── vectors.json # Local 384-dim embeddings cache (auto-maintained)
├── topics/
│ ├── preferences.md # User coding style and workflow rules
│ ├── decisions.md # Architectural and cross-project decisions
│ ├── environment.md # Machine, OS, paths, and tooling facts
│ └── agent-behavior.md # Corrections and operational protocols
└── sessions/
├── README.md
└── YYYY-MM-DD_slug-01.md # Distilled session checkpoints
Each entry in topics/<topic>.md uses a clean, human-editable block format:
- id: dec-016
date: 2026-10-25
project: global
core: true
tags: [opencode, plugin, local-memory, self-contained]
fact: All persistent memory rules are injected directly by opencode-local-memory's context hook.# Optional CLI setup: updates opencode.jsonc, scaffolds memory/, and warms vectors.json
npx @nandoblanco/opencode-local-memory install [--dir /path/to/memory] [--import]
# Import existing AGENTS.md/CLAUDE.md rules and compacted session summaries from opencode.db
npx @nandoblanco/opencode-local-memory import [--dir /path/to/memory] [--db /path/to/opencode.db] [--agents /path/to/AGENTS.md] [--limit 40]
# Incrementally sync topics/*.md and sessions/*.md into vectors.json
npx @nandoblanco/opencode-local-memory sync
# Hybrid, semantic, or exact keyword search
npx @nandoblanco/opencode-local-memory search "query" [hybrid|semantic|grep] [topN]
# Exact keyword grep
npx @nandoblanco/opencode-local-memory recall "exact keyword"
# Store a new fact from the command line
npx @nandoblanco/opencode-local-memory store decisions "arch, api" "Use REST endpoints for batch exports."
# Delete one or more entries by ID (or comma-separated IDs)
npx @nandoblanco/opencode-local-memory delete dec-002
# Deduplicate topic facts, prune auto-compaction stub files, and resync vectors.json
npx @nandoblanco/opencode-local-memory maintain [--dir /path/to/memory] [--prune-imported]Options can be passed in ~/.config/opencode/opencode.jsonc or via environment variables:
{
"plugins": [
{
"package": "@nandoblanco/opencode-local-memory",
"options": {
"directory": "~/.config/opencode/memory",
"minScore": 0.38,
"topK": 6,
"dialogWidth": "80%"
}
}
]
}| Option | Env Variable | Default | Description |
|---|---|---|---|
directory |
OPENCODE_MEMORY_DIR |
~/.config/opencode/memory |
Path to the persistent memory directory (memory.md, topics/, sessions/, vectors.json) |
minScore |
(none) | 0.38 |
Minimum hybrid similarity score (0.0-1.0) for per-prompt auto-recall injection |
topK |
(none) | 6 |
Maximum auto-recalled facts injected per turn |
dialogWidth |
OPENCODE_MEMORY_DIALOG_WIDTH |
"80%" |
Width of the centered /memory TUI modal ("80%" or column count like 120; also respects OPENCODE_DIALOG_WIDTH) |
umbrellaDirs |
OPENCODE_MEMORY_UMBRELLA_DIRS |
[] |
Extra parent folder names (array or comma-separated env var) treated as umbrella workspace roots alongside defaults (git, clients, projects, repos, workspace, code, dev, src) |
MIT


{ "plugins": [ { "package": "@nandoblanco/opencode-local-memory", "options": { "directory": "~/.config/opencode/memory", "minScore": 0.38, "topK": 6, "dialogWidth": "80%" } } ] }