anomalyco / anomalyco/opencode

[FEATURE]: Long-term persistence memory system (/teach, /recall, /learn, /memory)

Open
#48,497 4 comments 0 reactions 1 assignee View on GitHub

@rekram1-node is already working on this.

Since Sep 11, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Feature hasn't been suggested before
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request

Add a persistent long-term memory engine backed by SQLite (memory.db) to allow OpenCode to retain user conventions, architectural guidelines, and learned lessons across sessions.

Proposed Capabilities:
  1. /teach <context>: Persist user instructions, architectural preferences, and rules.
  2. /recall <query>: Retrieve relevant memories via SQLite FTS5 full-text search.
  3. /learn [content]: Automatically extract or manually save lessons and insights discovered during coding sessions.
  4. /memory [query]: Explore, search, filter, and inspect saved memories via CLI and TUI dialog.
Benefits:
  • Eliminates repeating context, repository guidelines, and coding preferences across new sessions.
  • Fast, local, zero-dependency persistence using SQLite WAL mode and FTS5 indexing.
  • Accessible conversationally by the agent (tool call), via CLI commands (opencode memory ...), and via TUI slash commands and dialogs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.