OpenCode with Memory Bridge

How to keep your OpenCode memory when you switch models

Connect OpenCode to Memory Bridge and whichever model you pick reads your project context from the same place.

OpenCode brings what you wrote in AGENTS.md into every session, and its documentation describes no memory of earlier sessions.

Last reviewed:

Start for free No credit card needed

What does OpenCode remember on its own?

OpenCode reads AGENTS.md in the project and a global file in its config folder that applies to every session, and falls back to CLAUDE.md when there is no AGENTS.md. You can switch models whenever you like.

Checked against OpenCode's documentation on rules in October 2026. These features change often, so check that page for the latest.

What does Memory Bridge add to OpenCode?

Switch models as often as you like: your project context sits in Memory Bridge, read by whichever model you choose, and by your other tools too.

Connect OpenCode in three steps

  1. 1

    Add Memory Bridge

    Add Memory Bridge to the OpenCode config file under external services, then sign in.

  2. 2

    Sign in

    Sign in to Memory Bridge and approve if asked, and OpenCode can reach all your spaces.

  3. 3

    Carry on working

    Ask OpenCode as you always do. It finds what your request needs in your memory.

Connecting outside services in OpenCode may be limited to certain plans or versions, so check its official help page before you start.

Say it in Claude, carry on in OpenCode

Claude
You

Branches are named by work type then ticket number. Commit messages are in English, in the imperative.

Claude

Saved.

Saved to memory · Branch convention
One memory
OpenCode
You

Create a branch and commit this fix.

With Memory Bridge

Created branch fix/1482 and committed with an imperative message, following your saved branch convention.

From memory · Branch convention

Illustrative example

Common questions

Does OpenCode remember previous sessions?

Its documentation describes no memory between sessions. What lasts is what you write in AGENTS.md, which it reads every session.

Does OpenCode read CLAUDE.md?

Yes, when there is no AGENTS.md in the same place.

Does Memory Bridge replace OpenCode's instruction files?

No. Your project instruction files stay where they are and keep doing their job. Memory Bridge adds what does not fit in those files and makes it available to your other tools.

What can OpenCode see of my memory?

All your spaces, including ones you create after connecting, and it can read and write in them. You can disconnect it at any time under Connected apps in your Memory Bridge settings.

What if the connection fails?

Write to us through the support channel with the tool's name, its version and the error message, and we will help you connect.

Keep reading

Memory for coding agents

Instruction files tell a coding agent how to write code, not why the project chose what it did. How to keep decisions and reasons across sessions and tools.

Claude Code

Claude Code remembers CLAUDE.md and its auto memory on your machine. Connect Memory Bridge and every session starts with what you decided in your other tools.

How Memory Bridge works

Connect your tool, tell Memory Bridge about your work, then carry on. How your context is saved and how it comes back in every new chat and every tool.

One memory. Every tool you use.

Start for free, no credit card needed. Your account arrives within minutes.

Start for free

No credit card needed · No commitment