Anvil is an alpha testing release. It may have bugs. If something here doesn't match what you see, tell us.
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.
~/.codex/AGENTS.md, then the AGENTS.md files from your project's root down to the folder you're in, and combines them. By default it stops at 32 KiB, a limit you can raise.[1] This is the right place for rules every run must follow.~/.codex/memories/, in the background. OpenAI's docs suggest treating them as a recall layer, and keeping required rules in AGENTS.md.[2]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.
brew install --cask vitkilabs/anvil/vitkilabs-anvil--dry-run to see the changes first:
anvil connect --client codex~/.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.
| File | What Anvil adds |
|---|---|
~/.codex/config.toml | An [mcp_servers.anvil] section, with a 60-second start-up allowance. The rest of the file is kept byte for byte. |
~/.codex/AGENTS.md | A block between anvil:begin and anvil:end: check Anvil's memory first, and write lasting facts back to Anvil. |
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.
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.
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.
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.
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.
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.
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.
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.