Codex guide

Wire Iranti into Codex.

Codex CLI reads MCP servers from both a global registry and a workspace file. One command handles both — and gives VS Code the same connection so Codex works the same way in the terminal and the editor.

You need Iranti running before this step. Follow the quickstart first →
1

Run the setup command

Run this once on the machine, from inside your bound project directory. Iranti registers itself with Codex globally and writes workspace MCP files for the current project.

$
iranti codex-setup
2

What gets written

The command registers Iranti in three places:

~/.codex/config.toml

Global Codex MCP registration. Iranti is available in every Codex session on this machine.

.mcp.json

Project-local MCP config pinned to this project's .env.iranti, so the right memory space loads automatically.

.vscode/mcp.json

VS Code MCP config for Codex VS Code sessions. Same connection, same memory, whether you use the terminal or the editor.

3

Verify the registration

Confirm Codex picked up the registration before opening a session:

$
codex mcp list
codex mcp get iranti

You want to see command: iranti, args: mcp, and the project env path when running from a bound project.

4

Open Codex in your project

Launch Codex from the directory that contains your .env.iranti file so Iranti loads the right project binding.

$
codex -C /path/to/your/project

How memory works in Codex

At session start, call iranti_handshake with the current task. Iranti loads your working-memory brief and injects relevant facts before the first response.

Before each response, iranti_attend checks whether any stored facts are relevant and injects them into context.

Codex does not have a Stop hook like Claude Code. When your response contains a durable summary worth keeping — a decision, a next step, a blocker — use iranti_remember_response to persist it.

At meaningful milestones, use iranti_checkpoint to save current step, next step, and open risks so interrupted work can resume cleanly — even when picking up in Claude Code or another tool.