Retain7 for OpenCode
Shared memory for OpenCode
OpenCode works well alone and badly across a team: its session knows nothing about the conventions another developer's agent learned, and what it learns stays in that terminal.
How it works
One memory, shared across your tools
Run opencode mcp add and opencode mcp auth once, globally, and OpenCode gains the memory tools in every repository. A line in your AGENTS.md makes it search before answering and hand off before stopping.
Saved in Cursor
Payments go through Dodo.
Found in OpenCode
The next session searches before it answers, so the decision is already in its context.
An example memory, not customer data.
Setup
Add Retain7 to OpenCode
A minute or two, once. The same steps are in the docs.
-
Run these once in a terminal:
opencode mcp add retain7 --url https://retain7.com/mcp --global opencode mcp auth retain7
-
So every session checks the team memory before it answers, add this line to ~/.config/opencode/AGENTS.md:
This team keeps its project memory in Retain7. Before answering how this project does something, call the retain7 memory_search tool.
Works with the rest
Your team does not have to use OpenCode
A project has one memory. Whatever the tool, the same decisions and failed attempts come back.
- Claude Code Shared memory for Claude Code
- Cursor Shared project memory for Cursor
- VS Code A team memory for VS Code agents
- Codex Persistent team memory for Codex
- Claude.ai Connect Claude.ai to your coding agents' memory
- ChatGPT Give ChatGPT access to your team's project memory
- Pi Shared memory for Pi
- Hermes Agent Shared memory for Hermes Agent
- Gemini CLI Shared memory for Gemini CLI
- Antigravity Shared memory for Google Antigravity
- Zed Shared memory for the Zed agent
Questions about OpenCode
Is the OpenCode setup per repository?
No. The --global flag adds Retain7 for every repository, and the project is chosen from each repository's git remote.
What is a handoff?
A short note an agent leaves when it stops: what was done, what is next and what failed. The next session in any tool starts from it.
Does it work offline?
No. Retain7 is a hosted service, so OpenCode needs a connection to search or save memories.
Can I export my memories?
Yes. Any project exports as JSON or Markdown, and deleting a project, team or account removes its data.
Give OpenCode a memory that lasts.
Free for 14 days on the Team plan. No card needed.