Try the demo

Share context between Claude Code and Codex

Claude Code and Codex each start a session knowing nothing the other found. Here are three ways to carry context across, from a file you write yourself to notes the agents keep. The first two need nothing installed.

1. One instructions file for both

Codex reads AGENTS.md: the one in ~/.codex, then each one from the repository's root down to the folder you started in. Claude Code reads CLAUDE.md, and recent versions read AGENTS.md too when a project has no CLAUDE.md. Put what both should know in AGENTS.md. If you also want a CLAUDE.md, or your Claude Code is older, make its first line an import, which works in every version:

@AGENTS.md

Now both agents start from the same text. Anything only Claude Code needs goes under that line in CLAUDE.md. Run /memory in Claude Code to see which instruction files it loaded.

Good for: rules that rarely change, such as how to run the tests, which folders not to touch, and the build commands.

To check both files against these limits, paste them into the AGENTS.md and CLAUDE.md checker.

Where it stops: you write it, and agents rarely keep it current on their own. Everything in it loads into every session, whether it's relevant or not, and Codex reads at most 32 KiB of instructions by default.

2. A hand-off file

When one agent finishes and the other takes over, ask the first to write down where it got to:

Before you stop, write HANDOFF.md: what you changed, what's left,
and what the next agent should know (commands that failed, decisions
we made). Keep it under 40 lines.

Then start the other agent with:

Read HANDOFF.md first, then carry on with what's left.

Good for: handing one task from Claude Code to Codex, or back, when you switch because of a limit or a second opinion.

Where it stops: you have to ask every time. The file describes one moment, so it's stale after the next change, and nothing tells the reader which parts still hold. Two agents working at once overwrite each other's hand-offs.

3. Notes the agents keep

This is what DMN does. Agents save what's worth keeping as short notes: markdown files in the project's .dmn/memories folder. Every session then starts with a briefing: your rules first, then the newest notes. A note whose code was changed or deleted since it was written is flagged, so an old note isn't taken for a current one.

Say Claude Code finds out, the hard way, why a Stripe webhook keeps failing its signature check. It saves:

---
name: stripe-webhook-raw-body
description: The Stripe webhook must read the raw body before any JSON parsing
---

Stripe signs the raw request body. The handler in app/api/stripe/route.ts reads
request.text() first; parsing JSON before verifying breaks the signature check.

The next day you ask Codex to add a checkout. Its briefing lists the note, so it leaves the webhook's raw body alone. You didn't tell it to read anything. The demo plays this out with sample data.

Agents don't always save notes unprompted, so ask at the end of a task: “save what you learned as a DMN note”. DMN can also write the hand-off from option 2 for you. With the hand-off hook, each Claude Code session's final message is saved as a hand-off, and the next session in the same checkout, Claude Code or Codex, starts with it in its briefing.

To set it up, start both agents from + agent in DMN's Fleet panel, and their panes get the briefing on every launch. For agents in your own terminal, these commands teach them the dmn command line and add the session-start briefing:

dmn skill-init --apply
dmn hook-init --apply --with-handoff
dmn hook-init --apply --agent codex

The first command covers every agent it finds. The second adds the briefing and the hand-off hook to Claude Code (leave out --with-handoff for the briefing alone), and the third adds the briefing to Codex. Leave out --apply to see what a command would change first. Step by step, for each agent: Claude Code and Codex.

DMN for Windows is coming soon. The commands work once it's installed.

Good for: ongoing work where both agents keep learning things, and you'd rather not be the one who carries them across.

Where it stops: it needs DMN, which runs on Windows for now. Notes are only as good as what the agents save, so read them now and then: they're plain files you can edit or delete.

Which one to use

AGENTS.mdHand-off fileDMN's notes
Who writes itYouThe agent, when you askThe agent; hand-offs on their own
When the other agent reads itEvery sessionWhen you tell it toEvery session, newest first
When it goes staleWhen you forget to update itAfter the next changeFlagged when its code changes
What it needsNothingNothingDMN, on Windows

They work together. Keep your rules in AGENTS.md (or as DMN rules), and let notes or hand-offs carry what the agents find out. If you only switch agents now and then, the first two are enough.

See Codex get Claude Code's note