Skip to article
← All articles

Multi-agent · Practical guide

How to Share Project Memory and Decisions Between Claude Code and Codex

Follow a complete decision change: build a shared record, load it into another agent, resolve stale updates and verify the result with a downloadable starter.

One changing project, two agents, and a decision both can verify.
AI-generated editorial cover
On this page

In the first session, Claude Code builds password login. The next day, you approve email codes instead. On the third day, Codex fixes a retry bug and follows the old password tests. Each conversation may sound reasonable while the project moves in two directions.

The useful shared memory is the information that stops that mistake: the current login decision, why it changed, where approval came from, and which parts of the implementation still need checking. This guide follows that change from its first record to a fresh agent reading it.

Start with the mistake you need to prevent

MomentWhat the agent can seeWhat must survive
15 November: Claude Code implements loginDEC-009 approves email and passwordThe approved scope and original source
16 November: the owner approves a changeDEC-014 switches the first release to email codesWhat changed, why, and which decision it replaces
17 November: Codex handles retriesOld tests still describe password loginRead DEC-014 before treating existing code as the intended design

Old code is evidence of what exists, not automatically evidence of what is still intended. A current decision is evidence of intent, not proof that implementation is complete. Keep both visible so the receiving agent can compare them.

Mem0 illustrates a related failure across two services: one agent changes an event field and another cannot see the change. Its vendor-run comparison is useful because it shows inputs and outcomes. For your project, test a maintained file as well as any memory service; the important question is which route delivers the missing decision reliably.

Share the decisions that change the next action

Start with one project and a few records that affect what another agent should do. A one-off task whose inputs are already complete may need only a handoff. Persistent records earn their maintenance cost when the same project continues across sessions, repositories or tools.

Keep sharedExampleWhy the next agent needs it
Confirmed decision and scopeEmail codes for the first web releaseChoose the correct behavior to implement
Rejected option and reasonDo not ship both login methods at launchAvoid repeatedly proposing an already rejected option
Verified result and evidenceRetry check passed on a named commitKnow what was checked and whether the result is stale
Uncertainty or unresolved conflictProduction delivery has not been checkedAvoid reporting an assumption as completion

Keep temporary hypotheses in the task notes until they are supported. A personal writing preference belongs in user-level context; this login decision belongs to this project and release. Do not let a useful rule in one repository quietly become a rule for every repository.

Retain the reason a proposal was rejected. “Use email codes” alone will not tell a later agent why adding password login back would reopen an already settled launch decision.

Build one current record and a small history

For two coding agents using the same repository, begin with PROJECT-MEMORY.md for the current answer and DECISION-HISTORY.md for earlier decisions. Put a short pointer in the host-supported project instructions so the files are discoverable. Keep the instruction-loading details in the separate setup guide.

SaveSlot UI illustration: current and superseded decisions alongside a pending implementation check. Fictional data and custom fields.
SaveSlot UI illustration: current and superseded decisions alongside a pending implementation check. Fictional data and custom fields.
# PROJECT-MEMORY.md (fictional example)
Project: example-checkout
Topic: launch-login
Current decision: DEC-014
Revision: 5
Status: confirmed
Decision: Use email codes for the first web release.
Confirmed by: project owner
Source: reviews/2026-11-16.md#login-approval (fictional)
Effective from: 2026-11-16 09:00 Asia/Singapore
Recorded at: 2026-11-16 09:10 Asia/Singapore
Supersedes: DEC-009 (email and password)
Reason: Keep the first release to one login method.
Rejected option: Ship both methods in the first release.
Scope: First web release; later releases are undecided.
Implementation: Not verified. Inspect login UI, retry handler and tests.
History: DECISION-HISTORY.md
Next check: Read DEC-014, inspect the affected code, run existing checks.

The source path above is a placeholder for a real approval, such as a review comment or message. Before using the template, replace it with something both agents can open. Keep event time and recorded time separate: an agent may learn about an earlier decision hours or days later.

A topic such as launch-login has one current pointer. DEC-009 remains in the history as superseded by DEC-014. The rejected alternative and the reason stay linked to the same change. If the source cannot be opened, the next agent should report the missing evidence rather than silently treating the copied summary as verified.

Fictional decision transition: DEC-014 is current, DEC-009 remains in history, and the approval source stays attached.
Fictional decision transition: DEC-014 is current, DEC-009 remains in history, and the approval source stays attached.

Revision 5 is a bookkeeping label in this file. It cannot prevent another writer from overwriting the file. Concurrent protection depends on your storage and editing workflow, which we handle below.

Walk an approved change through the record

Suppose the current file is still revision 4, pointing to DEC-009. The owner now approves email codes for the first release. An agent suggesting that change is not approval; first locate the actual confirmation and its scope.

  1. Read the current record and history. Confirm that DEC-009 is still current and note unrelated changes.
  2. Open the approving source. Check which project, release and decision it covers; leave a proposal pending if it has not been approved.
  3. Add DEC-014 to history with its reason, source and effective time. Mark DEC-009 as superseded rather than deleting it.
  4. Update the current pointer to DEC-014 and revision 5. Keep implementation checks pending until code and tests have been inspected.
  5. Read both files back. Confirm that the current pointer, history and source agree before handing over.
Update the shared login decision only from the approval I provided. Read the latest records first. Preserve DEC-009 in history, add DEC-014 with its source and first-web-release scope, and update the current pointer. Keep code, test and deployment status unverified until checked. Return the saved current record and the history change.
After recording the approvalExpected state
Current decisionDEC-014: email codes, confirmed for the first web release
Previous decisionDEC-009: superseded; its earlier source remains readable
ImplementationPending inspection; not automatically completed by updating memory
SaveSlot UI illustration: DEC-014 with its scope, approval source and earlier decision. A custom record example, not a prebuilt decision-management module.
SaveSlot UI illustration: DEC-014 with its scope, approval source and earlier decision. A custom record example, not a prebuilt decision-management module.

A plain two-file setup has no atomic update across both files. Give one agent the decision update, let it finish and read back, then let the next agent start. If work is interrupted between the history update and the current pointer, reconcile those two before proceeding.

Make the next agent actually read it

Saving and loading are separate steps. An agent already working from an older prompt may continue to follow it until it reads again. A new conversation also needs a reachable source and an explicit retrieval step; the mere presence of a file or connection does not establish that it was loaded.

WhenRead or synchronizeAsk the agent to show
Start a fresh conversationProject instructions and the current project recordThe project identity and current decision
Begin a login-related changeThe latest launch-login record and its sourceDecision ID, scope and pending checks
Receive a decision change mid-sessionReload the changed record; compare it with the previous assumptionWhich planned action must change
Switch to a separate checkout or deviceBring the shared files or service view up to date firstWhich source version is actually accessible
Before changing login in example-checkout, read PROJECT-MEMORY.md and the linked decision history from the latest accessible version. Return the current decision ID, status, source, scope and implementation checks still pending. Keep superseded and proposed decisions separate. If you cannot access a source or find conflicting approvals, report that gap before the affected change. Do not edit these records in this read-only step.
Illustrative read-back (not an executed tool result)
Project: example-checkout
Current: DEC-014, confirmed, revision 5
Behavior: email codes
Scope: first web release only
Source: reviews/2026-11-16.md#login-approval
Previous: DEC-009, superseded
Pending: inspect login UI, retry handler and tests

Check the source version in that response. If the agent returns DEC-009, ask which file or record it read and whether synchronization completed. If it returns no record, distinguish missing access from a genuinely empty store. Neither result authorizes inventing the missing decision.

Letta’s current shared-memory documentation gives a concrete example of why delivery matters: its shared repositories use commits and synchronization between checkouts. Supermemory’s coding-agent walkthrough describes session injection and capture hooks. These are different mechanisms; verify the one your actual host uses.

Recover from stale edits, disagreement and timeouts

These failures need different responses. “Take the newest text” is unsafe when the newest text is a proposal, a partial write or an update based on an older copy.

FailureIn the login exampleRecovery
Stale writeTwo agents read revision 5; one edits scope while the other overwrites from its old copyRead the newest version, compare each intended change and preserve unrelated updates
Conflicting meaningTwo approving sources give incompatible login requirements for the same releaseShow both sources and overlapping scope; resolve that decision before the affected implementation
Unknown write resultThe save request times out after submissionRead the destination first; check whether the intended revision or change exists before retrying

For shared files, prefer one writer per decision update and inspect the diff before committing. Separate branches prevent editing the same working file, but a successful text merge can still leave contradictory decisions. Review the meaning as well as the Git merge.

For a record service, use a supported version precondition and stable retry identifier when available. A conflict requires a fresh read, not a blind retry. If those features are absent, serialize updates and inspect saved results; adding a revision field alone cannot provide them.

Keep facts and proposals distinct. An agent’s guess that email codes will improve delivery is a hypothesis. The owner’s approval to use them is a decision. Observed delivery results belong in a separate result record with the environment and evidence.

Test the workflow in a fresh conversation

Use a disposable example project and fictional data. Start with the old decision, update it through an approved sample change, then open a conversation that has not seen the previous chat. Keep the model, task and accessible code the same when comparing routes; change only whether the current record is available and read.

CheckExpected resultWhat a failure suggests
Ask for current login behaviorDEC-014, its first-release scope and approval sourceThe new record was not loaded or retrieval used an older copy
Ask why password login was droppedDEC-009 history and the recorded reasonThe current answer survived but its rationale was lost
Ask whether the implementation is finishedPending checks remain pending until inspectedThe agent confused an approved plan with verified work
Ask about an unrelated projectNo reuse of this project’s decisionProject scope is leaking
Interrupt an update and resumeReconcile the current pointer and history before continuingPartial updates are being presented as complete
From the shared records for example-checkout, tell me: which login decision is current, why the previous one changed, where approval is recorded, and what implementation checks remain. Then say whether this decision applies to a different project. Cite the records you actually read. Missing evidence must remain missing; do not infer a completed deployment.

Save the actual response and compare it with the expected row. If the test fails, record the failure and fix the loading or update path. The table is an acceptance plan, not measured performance. Even a successful trial proves only that case, host and accessible source version.

You can also try a useful baseline: give a fresh agent the same task and code without the current record, then repeat with the record explicitly read. If both succeed because the answer was already obvious in the code, choose a case whose missing context genuinely lives in the decision record. Do not report a benefit the comparison did not show.

Choose the smallest setup you can maintain

Your situationA useful starting pointMaintenance you still own
Two local agents and one repositoryShared Markdown plus Git historyDiscovery, current pointers, synchronization and writer coordination
Several projects with a human-readable registerGoogle Sheets or NotionProject separation, permissions, current version and how each host retrieves it
Different authorized assistants need the same structured recordsSaveSlot or another shared record serviceConnect each host, verify record visibility, and make retrieval part of the task

A file is often enough when both agents can access it and one person can keep it current. Consider a service when repeated copying, cross-device access or structured querying is taking more effort than the project work. Compare the maintenance burden as well as the storage feature list.

For SaveSlot, use the Claude Code setup and Codex setup guides for the actual hosts you use. Start with a read of an authorized Slot. With an approved test write, store one harmless decision, then ask the second host to retrieve that same record and its source. Do not assume a configured connection supplies automatic per-task loading.

Read the current launch-login decision from the authorized Slot for example-checkout. Return the saved record identifier, current value, status, scope, source and update time. If the Slot or tools are unavailable, explain which access is missing. Do not create a new record as a substitute for this read.

Use the project handoff guide for a single transfer of work, and the instructions and skills guide for reusable procedures. Keep this shared decision record focused on what is current, why it changed, and what the next agent can verify.

Sources & notes

Check the linked official documentation for current product behavior. Illustrations and downloadable examples use fictional data; they do not demonstrate a live account connection or write.

Revision history

  • : Published
  • : Updated content and references

Prepared by Jasper with AI-assisted drafting and illustrations.

Keep exploring

All articlesLast updated