Context engineering in AI Bridge: one memory for every coding agent

We make AI Bridge, a Mac app that runs these command-line agents side by side. We do not sell any of them, are not affiliated with their makers, and none of them paid for or reviewed this guide. We use them every day.

Why your agents keep making the same mistakes

Here’s a week I’ve had more than once. Monday, an agent spends twenty minutes working out that the checkout tests need the Stripe test clock reset before every run. It gets there, the tests pass, the session ends. Tuesday, a different agent in the next tab hits exactly the same wall. Wednesday, a teammate’s agent does it again.

None of them did anything wrong. Each coding CLI just keeps what it learns to itself:

  • Different files. Codex, Grok Build and OpenCode read AGENTS.md; Claude Code reads CLAUDE.md, and AGENTS.md only when a project has no CLAUDE.md.
  • Different memory. Claude Code saves its own notes by default; Codex and Grok Build can, once you turn it on; OpenCode documents none. Each keeps them in its own folder, on one Mac.
  • Nobody connects the dots. Grok Build’s /dream and Codex’s background consolidation only ever look at their own sessions, so what one agent learned never reaches the others.

With one agent you barely notice. Run five or ten a day, across a few CLIs and a team, and you pay for the same mistakes over and over, in time and in tokens.

Knowledge: write it down once, every agent reads it

Think of it as the onboarding doc you’d give a new engineer, except every agent actually reads it. Open a project in AI Bridge and go to Context › Knowledge. A project keeps topics every workspace in it shares, and a workspace can keep its own on top.

  • A topic is a Markdown file. A title, a one-line “about”, and the notes, saved in the project’s folder on your Mac. Edit it in AI Bridge or in any editor; nothing is locked in.
  • Every agent gets the list. Each agent and automation you start, whichever CLI it runs, begins with the topics’ titles and about lines, through that CLI’s own instructions. It opens a topic when its subject comes up, so twenty topics cost the tokens of twenty lines, not twenty files.
  • Each note has a kind, so it ages the way it should:
The three kinds of note, with examples
KindForExample
FoundationWhat stays trueDeploys and environments: staging deploys on merge, production only from a tag
WorkingWhat’s in progressCheckout migration: the new rates API is live behind a flag
One-offWhat passes14 Nov incident: payments-api restarts, fixed in the connection pool

So yesterday’s incident helps today’s agent, and never turns into a rule for next year’s.

Instructions: what every agent is told, with its price on it

Some things every agent should hear on every turn: the test command, the branch rules, “never touch the billing schema”. Context › Instructions holds them for the project and for each workspace, and shows roughly how many tokens each layer adds to every turn, with a warning when one grows large.

That’s most of context engineering on one screen: short rules in Instructions, everything longer in Knowledge, where it costs nothing until an agent opens it. Your repository’s AGENTS.md and CLAUDE.md keep working exactly as before; the CLIs still read them.

Dreaming: agents learning from each other’s mistakes

This one is a new idea, so let me explain it properly.

Agents make mistakes. All of them, on every CLI. One runs the tests without the env file and they fail. Another pushes with the wrong GitHub account. Another spends ten minutes finding out the repo uses pnpm, not npm. Most of the time it works it out and carries on, and that’s fine. The problem is that the lesson stays in that one session. Tomorrow a fresh agent starts from zero and makes the same mistake.

With one agent you’d hardly notice. But once you run enough of them, the pattern is obvious: three agents on the same project hit the same wall in the same week, each one burning the same time and tokens getting around it. No single agent can see that. It only shows up when you look across all of them.

That’s what a dream does. It’s an agent AI Bridge starts for you that goes back over your other agents’ work, the way sleep turns your day into memory. It looks at what they did, which tools and commands they ran, where they failed and what fixed it, and turns what keeps coming up into knowledge. Then every agent you start after that already knows it. The mistake gets made once, not every day.

How a dream works

What it reads

  • Your agents’ recent sessions, in one workspace or across the whole project: everything since your last dream (the first one looks back 14 days).
  • The real work, not a summary. For Claude Code and Codex agents, the conversation itself: what was asked, what the agent said, every command and tool it ran, and every one that failed, with its error. OpenCode and Grok sessions are counted by their numbers for now.
  • The knowledge you already have, so it builds on it instead of repeating it.
  • Nothing secret. Secrets are stripped from every page before the dreaming agent sees it.

What it looks for

  • Mistakes and their fixes: a command that failed, and what finally worked.
  • Things agents had to rediscover: the same answer found again and again, in different sessions.
  • Patterns across agents: when three agents hit the same wall, that’s the lesson worth writing down.
  • Notes that went stale: it checks whether a path or command a note names still exists, and proposes removing what’s outdated, merging duplicates and retiring topics nobody needs.

What lands in Review

Each finding waits in Context › Review as a card. The headline is the lesson itself, with the evidence under it: how many times it came up, in how many agents, and the quotes from the sessions it came from.

A card in Review

New lesson · found by Codex
The checkout tests need the Stripe test clock reset before each run.
4 times · 3 agents

Apply it, Edit it first, or Dismiss it. Changed your mind later? Undo it from Applied. Once it’s in, every agent you start knows it, whatever CLI it runs.

Running one

  1. In Context › Review, press Dream now.
  2. Pick the scope: this workspace, or the whole project.
  3. Pick the CLI that dreams: Claude Code, Codex or OpenCode. It runs on your own plan with that CLI and takes a minute or two.
  4. Go through what it found.

What it never does on its own

Nothing changes until you press Apply. Some lessons belong somewhere else: one for your repository’s AGENTS.md or CLAUDE.md arrives as an instruction fix, Review shows exactly what Apply would write there, and nothing is written until you press it. One for a CLI’s own memory is a suggestion you put there yourself: AI Bridge never writes to the CLIs’ own memory. And dreaming is free on every plan.

Share it with your other Macs and your team (beta)

  • Your own Macs with Pro, your team with Team: a project’s knowledge, the same on every machine.
  • Kept where you choose: on aibridge.sh, end-to-end encrypted, so we can’t read your topics; in your own Amazon S3 or Azure storage, encrypted; or in your own GitHub repository, as plain Markdown.
  • Joining takes six words. A new Mac or teammate joins by comparing six words with someone already in.
  • You see every change. Changes from others arrive in your Inbox, and with Admins approve on, an admin approves them first.

So the mistake one agent made on your Mac on Monday is a lesson in your teammate’s agent on Tuesday, whichever CLI either of you runs.

AI Bridge vs each CLI’s own memory

Context in AI Bridge and in the CLIs on their own, November 2026
AI BridgeEach CLI on its own
Works withClaude Code, Codex, Grok and OpenCode alikeThat CLI only
Where it livesPlain Markdown in your projectEach CLI’s own folder and format
What loadsTopic titles; a topic when it’s neededInstruction files, every session
Learning from mistakesDreaming, across your agents’ sessions; you approve each lessonGrok Build and Codex, over their own sessions; Claude Code and OpenCode document none
Other Macs and teammatesSynced or shared, encrypted (beta)Stays on one machine, or goes through git by hand

Start in five minutes

  1. Download AI Bridge, free to start, and open your project.
  2. Run your agents the way you do now, with whichever CLIs you use.
  3. In Context › Knowledge, add the three things you keep explaining, or skip this and let a dream find them.
  4. After a few days of work, press Dream now and apply what’s true.
  5. When it’s worth sharing, sync it to your other Mac with Pro, or to your team with Team.

Questions

What is context engineering?

Making sure an AI agent knows what it needs before it starts work, and keeping that true: the instructions it hears every turn, the knowledge it can look up, and tidying both as the project changes. In AI Bridge that’s the Context tab: Review, Knowledge, Instructions and Team.

What is dreaming?

An agent AI Bridge starts for you that goes back over your other agents’ recent sessions, finds the mistakes they made and the things they had to rediscover, and proposes them as lessons for Knowledge, with the evidence. You apply the ones worth keeping, and every agent after that starts with them.

Which agents does it work with?

Knowledge works with every agent and automation you start in AI Bridge: Claude Code, Codex, Grok and OpenCode alike. A dream runs on Claude Code, Codex or OpenCode; it reads Claude Code and Codex sessions in full, and counts OpenCode and Grok sessions by their numbers for now.

Does a dream change anything on its own?

No. You start each dream, and every finding waits in Review until you apply, edit or dismiss it; an applied one can be undone. A fix for your repository’s AGENTS.md or CLAUDE.md is written only when you press Apply on it, and AI Bridge never writes to a CLI’s own memory.

Who can read shared knowledge?

Your team. On aibridge.sh it’s end-to-end encrypted, so we can’t read your topics. You can keep it in your own Amazon S3 or Azure storage instead, encrypted, or in your own GitHub repository as plain Markdown.

What does it cost?

Knowledge and dreaming are free on every plan; a dream runs on your own plan with the CLI you pick. Syncing between your own Macs comes with Pro ($9.99 a month), and sharing with a team with Team ($14.99 a seat a month).

Sources

Checked on 17 November 2026. These tools change often; where a source and this page disagree, the source is right, and we would like to hear about it at hello@aibridge.sh.

  1. AI Bridge 0.9.8 release notes · github.com · 16 Nov 2026
  2. AGENTS.md · agents.md · checked 17 Nov 2026
  3. Claude Code: how Claude remembers your project · code.claude.com · checked 17 Nov 2026
  4. Codex: AGENTS.md · learn.chatgpt.com · checked 17 Nov 2026
  5. Codex: memories · learn.chatgpt.com · checked 17 Nov 2026
  6. Grok Build: project rules · docs.x.ai · checked 17 Nov 2026
  7. Grok Build: settings reference · docs.x.ai · checked 17 Nov 2026
  8. Grok Build: modes and commands · docs.x.ai · checked 17 Nov 2026
  9. OpenCode V2: instructions · opencode.ai · checked 17 Nov 2026

Change log

  • : First published, for AI Bridge 0.9.8.

Keep reading

Every article

Almost ready.

AI Bridge is in its last round of testing. Leave your email and we’ll send you the build the day it ships.