Skip to content
Retain7

Retain7 for Codex

Persistent team memory for Codex

Each Codex run begins without the reasoning behind your codebase. The failed approach from last week or a convention a teammate fixed in another tool has to be restated, or Codex repeats the mistake.

How it works

One memory, shared across your tools

Add three lines to config.toml and run codex mcp login once. Codex then reads and writes the same project memory as the rest of your tools, and a note in AGENTS.md makes it search the memory first.

Saved in Claude Code

Raising memory_limit did not fix the import timeout. Batch the inserts.

Found in Codex

The next session searches before it answers, so the decision is already in its context.

An example memory, not customer data.

Setup

Add Retain7 to Codex

A minute or two, once. The same steps are in the docs.

  1. Add this to ~/.codex/config.toml:

    [mcp_servers.retain7]
    url = "https://retain7.com/mcp"
  2. Then sign in:

    codex mcp login retain7
  3. So every session checks the team memory before it answers, add this line to ~/.codex/AGENTS.md:

    This team keeps its project memory in Retain7. Before answering how this project does something, call the retain7 memory_search tool.

Questions about Codex

What goes in the Codex config?

A single mcp_servers.retain7 block with the server URL. The setup on this page has the exact lines, and codex mcp login handles the sign-in.

Can Codex record failed attempts?

Yes. Failed attempt is one of the memory types, so the next agent in any tool finds out what did not work and why.

How does Codex know which project it is in?

The agent passes the repository's git remote, and Retain7 matches it to the project. The first save for a new remote creates the project.

Can I use a token instead of signing in?

Yes. For machines without a browser, set RETAIN7_TOKEN and use the bearer_token_env_var line shown in the setup.

Give Codex a memory that lasts.

Free for 14 days on the Team plan. No card needed.