OpenCode memory

How OpenCode memory works

OpenCode reads AGENTS.md, or CLAUDE.md when there is none, plus any files you list as instructions, and keeps each session on your machine, compacting it when the context fills. Nothing carries what a session worked out into the next one or to a teammate. Recallium adds memory your whole team’s agents share.

  • AGENTS.md, instructions and sessions, checked October 2026
  • Plugins or MCP: which to use for memory
  • Where built-in memory stops
  • One installer for OpenCode and your other agents
How far OpenCode’s memory reachesas of October 2026
  1. Every teammate, every agentRecallium
  2. Every teammate in OpenCode, through gitAGENTS.md in the repository
  3. You, in every project~/.config/opencode/AGENTS.md
  4. One session, until it is compactedThe session history

A session shared with /share is a public link to the conversation, not memory.

What OpenCode remembers today

  • AGENTS.md: project instructions OpenCode reads at the start, created or updated by /init. OpenCode's advice is to commit it to Git so the team shares it. A global ~/.config/opencode/AGENTS.md holds personal rules that are not shared.
  • CLAUDE.md, as a fallback: a project CLAUDE.md is used when there is no AGENTS.md, and ~/.claude/CLAUDE.md when there is no global file. OPENCODE_DISABLE_CLAUDE_CODE=1 turns that off.
  • Instructions: extra files, globs or URLs listed under instructions in opencode.json, combined with your AGENTS.md files.
  • Sessions: stored on your machine under ~/.local/share/opencode/. You can resume one with --continue or /sessions, and OpenCode compacts a session automatically when the context is full.

Where built-in memory stops

  • Instruction files are written by hand. They hold what you tell OpenCode, not what a session works out.
  • Sessions are local and get compacted. A resumed session carries a summary, and it stays on one machine.
  • Nothing crosses tools. What OpenCode learns does not reach the same repository in Claude Code, Codex or Cursor.

AGENTS.md is still the right place for build commands and conventions. Most teams use both.

OpenCode plugins or MCP for memory?

  • Pluginsare JavaScript or TypeScript modules that hook into OpenCode's events, such as a session compacting or a tool running. They load from .opencode/plugins/ or from npm, and they run only in OpenCode.
  • MCP servers are listed under mcp in opencode.json, local or remote, with OAuth for remote servers. The same server works in every other MCP client.

For memory a team shares across tools, MCP is the better fit: Recallium connects as an MCP server, so OpenCode, Claude Code, Codex and Cursor all read and write the same memory.

What Recallium adds to OpenCode

  • The team's reasoning, as the work lands: the approach, the decision, the root cause and the fix, each linked to its files
  • What the team settled, before the edit: Recallium finds the decisions and fixes about the code being changed and feeds them to OpenCode
  • Shared with your team: on Cloud Pro, every teammate's agent reads and writes the repository's memory
  • Shared with your other agents: the same memory in Claude Code, Codex, Cursor, GitHub Copilot and any MCP client
  • Handoffs: workstreams, working state and session recap carry an effort across sessions and teammates

Add Recallium to OpenCode

  1. Run the installer: on macOS or Linux, npx -y recallium install finds OpenCode, plus your other agents, and adds the Recallium MCP server
  2. Sign in: authenticate the recallium server when you are prompted
  3. On Windows: the installer does not connect OpenCode yet; the supported clients guide lists what it covers on each system

Full steps are in the quickstart. Join the waitlist for Recallium Cloud.

Questions

Does OpenCode have memory?

Not across sessions, as of October 2026. OpenCode reads AGENTS.md and your instruction files every time, and it keeps each session on your machine so you can resume it, compacted when the context fills. Nothing carries what one session worked out into a new one, a teammate's OpenCode or your other agents; an MCP memory server such as Recallium adds that.

What are OpenCode plugins?

JavaScript or TypeScript modules that hook into OpenCode's events, loaded from .opencode/plugins/, your global config, or npm. They are the way to change how OpenCode itself behaves. For tools and memory you want in every agent, an MCP server reaches further.

Does OpenCode read CLAUDE.md?

Yes, as a fallback: a project CLAUDE.md is used when there is no AGENTS.md. OpenCode's unreleased next version reads AGENTS.md only, so AGENTS.md is the file to keep.

AGENTS.md or Recallium?

AGENTS.md for the instructions OpenCode should follow every time. Recallium for the team's record: the decisions, root causes and fixes agents work out, found when they are relevant.

Is a shared OpenCode session the same as shared memory?

No. /share publishes a conversation as a public link. It is a transcript anyone with the link can read, not memory an agent searches in the next session.

One memory under every agent your team runs.

Recallium gives OpenCode the decisions and fixes your team already worked out, and keeps them in step with your other agents. Join the waitlist for Recallium Cloud, the managed engineering memory for your team.