Persistent memory for Claude Code and OpenCode - knowledge + session storage
| .opencode | ||
| tests | ||
| .gitignore | ||
| AGENTS.md | ||
| CHANGELOG.md | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
Model Memory
Persistent memory for OpenCode: knowledge (permanent) + session (temporary).
Why You Need This
LLMs forget everything between sessions and after context compaction. This tool gives them persistent memory.
- Long-term knowledge (
knowledge.md): Architecture, gotchas, patterns, configs - Session memory (
session.md): Plans, todos, progress — survives compaction - Session isolation: Multiple sessions/agents can work in parallel without conflicts
Benefits: No rediscovering the same patterns. Faster debugging. Lower token usage. Work resumes seamlessly after interruptions.
Quick Start
- Copy
.opencode/folder to your project - Add
AGENTS.mdto your project root - Done — OpenCode will automatically save discoveries and track work
Features
- Two-tier storage: Permanent knowledge + temporary session state
- Session isolation: Multiple sessions can coexist (v5.1+)
- 18 commands: 6 for knowledge, 12 for session
- Word boundary search: "log" won't match "catalog"
- Field weighting: Category matches rank higher than content
- Auto-recovery: Session pointer survives context compaction
- Human-readable: Plain Markdown files
- No database: Pure file-based
- Zero setup: Auto-installs Python via uv
- Cross-platform: macOS, Linux, Windows
Categories
Knowledge (10): architecture, discovery, pattern, gotcha, config, entity, decision, todo, reference, context
Session (7): plan, todo, progress, note, context, decision, blocker
Statuses (4): pending, in_progress, completed, blocked
License
MIT