VVitkilabs

Anvil is an alpha testing release. It may have bugs. If something here doesn't match what you see, tell us.

Anvil docs · Codex and ChatGPT memory

Make Codex and ChatGPT remember your project.

Codex reads AGENTS.md files each time it starts, and it can keep its own local memories if you turn them on. To give Codex and the ChatGPT desktop app one memory that is kept encrypted on your own machine, and shared with Claude Code and GitHub Copilot, install the free Vitkilabs Anvil app and connect it to Codex. Anvil's instructions then ask Codex to check its memory first and to write lasting facts back. It works in the Codex command line and the ChatGPT desktop app, not on chatgpt.com or in the mobile app.

What Codex and ChatGPT keep on their own

Instructions files, and optional memories.

Anvil adds a memory that sits outside any one assistant: encrypted on your machine, searchable, and shared with Claude Code and Copilot if you connect them too.

Set it up

Five steps.

  1. Install Anvil. Get it from the download page: macOS (Apple silicon), Windows 10 or 11, or Linux (.deb, .rpm or AppImage). On a Mac, Homebrew is easiest:
    brew install --cask vitkilabs/anvil/vitkilabs-anvil
  2. Create your vault. Open Anvil. Pick a passphrase and save the recovery PDF somewhere outside the Anvil folder. Your memories and keys are encrypted with it.
  3. Connect Codex. Anvil finds Codex on its own: on the setup screen, leave it ticked and click Connect. Or use a terminal; add --dry-run to see the changes first:
    anvil connect --client codex
  4. Pick how Anvil thinks. Use your ChatGPT or Claude sign-in, so you don't need a key, or add an API key, or point it at a local model.
  5. Restart. Quit the ChatGPT desktop app completely and open it again, or start a new Codex CLI session. Then tell Codex something worth remembering, start a new chat and ask about it.
What Anvil changes

Two files in ~/.codex.

Codex keeps its settings in the same ~/.codex folder on every system, and they cover both the ChatGPT desktop app and the Codex command line. Anvil backs up each file as <file>.anvil-bak before its first edit.

FileWhat Anvil adds
~/.codex/config.tomlAn [mcp_servers.anvil] section, with a 60-second start-up allowance. The rest of the file is kept byte for byte.
~/.codex/AGENTS.mdA block between anvil:begin and anvil:end: check Anvil's memory first, and write lasting facts back to Anvil.
How recall works

Codex is asked, not forced.

Codex has no hooks, so Anvil can't step in before each prompt the way it does in Claude Code. Instead, the instructions in AGENTS.md ask Codex to recall from Anvil before it starts, and to save lasting facts as it works. In practice that means Codex calls Anvil's memory tools itself, and it can skip them: whether it checks Anvil, and what it does with what it finds, is up to Codex, and Anvil can't change that. If you want something recalled for sure, ask it to check Anvil.

What gets saved is what you'd otherwise re-explain: decisions and why, constraints, fixes that worked, preferences. Anvil keeps facts and the links between them, flags a new fact that clashes with an old one, and shows where each memory came from.

If you've also turned on Codex's own memories, you have two stores. We run Anvil as the only one, because two memories drift apart and contradict each other.

Where it works

Codex and the desktop app's Work mode.

Your memory stays in an encrypted database on your computer. You sign in to ChatGPT in its own app; Anvil never handles that login, and the sign-in is never sent to Vitkilabs. After each Anvil update, run anvil connect --refresh so Codex gets the current instructions.

Questions

Short answers.

Does ChatGPT remember my project between chats?

ChatGPT on the web has its own memory, which you manage under Settings › Personalization. Codex reads AGENTS.md files each time it starts, and can keep local memories, which are off by default.

How do I make Codex remember my project with Anvil?

Install the free Anvil app, create your vault and connect Codex, from the setup screen or with anvil connect --client codex. Anvil adds its memory tools to Codex's config.toml and instructions to AGENTS.md that ask Codex to check Anvil's memory first.

Does Anvil work on chatgpt.com or the ChatGPT mobile app?

No. They can't use tools on your computer, so they can't reach Anvil. Anvil works in the Codex command line, and in the ChatGPT desktop app in Codex or in ChatGPT's Work mode.

Do I need an OpenAI API key?

No. Anvil can use your ChatGPT sign-in for its own work. You sign in in ChatGPT's own app, and the sign-in is never sent to Vitkilabs.

Will Anvil change my config.toml?

Only its own [mcp_servers.anvil] section. The rest of the file is kept byte for byte, and Anvil saves a backup before its first edit. Add --dry-run to anvil connect to see the change first.

Sources

Where the facts about other products come from.

Each was checked on its maker's own site on 18 October 2026. Products change: if one of these no longer matches, tell us and we'll correct it.

  1. OpenAI, Codex docs: Custom instructions with AGENTS.md (discovery order, 32 KiB default limit).
  2. OpenAI, Codex docs: Memories (local Codex memories, off by default, stored under ~/.codex/memories/; ChatGPT web memory).
More questions

Related pages.