Use REA with OpenAI Codex
Unofficial guide. This site is an independent community guide and is not affiliated with the REA project. For authoritative docs see the official REA website and the morluto/rea GitHub repository. Commands here are taken from the official README/docs (checked 2026-10-25); REA changes quickly, so verify against the official docs.
Codex is one of REA's officially supported agents (client ID codex).
Related guides
- MCP setup for Claude Code & Cursor
- REA with Windsurf, Gemini CLI, VS Code & more
- Troubleshooting & FAQ
Sources: installation.md#supported-agents · client-configuration.md · issue #2164
Short answer: yes, REA works in OpenAI Codex. Run npx -y rea-agents@latest setup --client codex, restart Codex, and codex mcp list should show a server named rea. Below is every step with real output from our test machine (Codex CLI 0.163.0, Linux; first run 2026-10-19 on rea-agents 6.5.0, re-run on 6.7.0, the current npm latest, with Node.js 22.23.3 on 2026-10-23).
1. Install Codex and sign in
Skip this if codex --version already works. From OpenAI's Codex CLI docs:
# macOS / Linux (standalone installer)
curl -fsSL https://chatgpt.com/codex/install.sh | sh
# or with npm (what we used)
npm install -g @openai/codexOn Windows, the REA get-started page gives the PowerShell installer powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex". Then open a project folder, run codex and choose Sign in with ChatGPT (or another sign-in method) the first time. We didn't sign in on our test machine. The MCP commands below work without signing in.
2. Check Node.js
Codex starts REA with npx, so the Node.js on Codex's PATH must be 22.23.4+, 24.22.1+ or 26.12.1+ (rea-agents 6.8.0; 6.7.0 and earlier accepted 22.19+). On Node 20, rea doctor fails its node check (real output).
3. Register REA with Codex (two ways)
a) REA's setup (recommended)
npx -y rea-agents@latest setup --client codex
# Windows PowerShell with script execution disabled:
npx.cmd -y rea-agents@latest setup --client codex
# from a script / CI (no prompt): add --yesIf npm asks to install the package, answer y. Setup writes the entry and installs REA's workflow skill to ~/.agents/skills/reverse-engineer-anything. This is the file 6.7.0 wrote for us:
# ~/.codex/config.toml (written by rea setup, rea-agents 6.7.0)
[mcp_servers.rea]
command = "npx"
args = [ "-y", "[email protected]", "mcp" ]
startup_timeout_sec = 30
tool_timeout_sec = 450New in 6.7.0: setup also writes tool_timeout_sec = 450. 6.5.0 wrote only startup_timeout_sec = 30, so long Ghidra or Hopper calls hit Codex's default 60-second tool limit (why ~60 s). If your entry still says [email protected] and has no tool_timeout_sec, rerun setup.
b) Codex's own command
Codex can add MCP servers itself (OpenAI MCP docs). We tried it in a clean home folder:
$ codex mcp add rea -- npx -y [email protected] mcp
Added global MCP server 'rea'.
$ cat ~/.codex/config.toml
[mcp_servers.rea]
command = "npx"
args = ["-y", "[email protected]", "mcp"]The difference: this doesn't add startup_timeout_sec = 30 or tool_timeout_sec = 450, and doesn't install REA's skill. Use (a) unless you only want the bare server.
4. Verify that Codex sees REA
$ codex --version
codex-cli 0.163.0
$ codex mcp list
Name Command Args Env Cwd Status Auth
rea npx -y [email protected] mcp - - enabled Unsupported
$ codex mcp get rea
rea
enabled: true
transport: stdio
command: npx
args: -y [email protected] mcp
cwd: -
env: -
startup_timeout_sec: 30
tool_timeout_sec: 450
remove: codex mcp remove reaStatus: enabled confirms Codex will start REA. Auth: Unsupported is normal for a local stdio server (OAuth only applies to remote servers). Then check REA's side:
$ npx -y [email protected] doctor --client codex
healthy: true
environment_healthy: false
scope:
mode: explicit
clients[1]: codex
…
scope_checks[2]:
- name: node
ok: true
classification: healthy
detail: 22.23.3
…
- name: "registration:codex"
ok: true
classification: healthy
detail: ~/.codex/config.toml
Inside the Codex terminal UI, OpenAI's docs say /mcp lists active servers, and you can ask: "Check that REA is connected and list the REA tools you can use." We didn't test either one in a signed-in Codex session.
5. Common Codex problems
- MCP server timed out on first start: the first
npxrun downloads the package (about 7 s on our server). Warm the cache once withnpx -y rea-agents@latest --version, or raisestartup_timeout_sec. - REA missing after setup: setup writes to
$CODEX_HOME/config.toml(default~/.codex). If you use a customCODEX_HOME, run setup in a shell where it's exported. Project-scoped.codex/config.tomlfiles only apply to trusted projects, per OpenAI's docs. - Too many tools / context pressure: add
REA_MCP_INPUT_SCHEMA_PROFILE = "compact"under[mcp_servers.rea.env](details). We didn't test this in Codex itself. - After a REA release: the entry pins the version you ran setup with (6.7.0 on 2026-10-23, 6.8.0 from 2026-10-25). Rerun setup with
@latestto move the pin. Remove REA withcodex mcp remove rea.
6. A first task that needs no native engine
JavaScript/Electron analysis runs without Ghidra or Hopper. On our three-file demo app, REA found the price:format IPC handler at main.js line 3 in about 1.6 seconds (walkthrough). In Codex, try:
Use REA to analyze the Electron app in ./demo-app. List its IPC channels with file and line evidence.
REA or leanrea in Codex?
leanrea is an 8 KB skill (installable for Codex with npx skills add aicodeking/leanrea). It has the agent run plain shell tools instead of REA's 207 MCP tools. Pick leanrea if you want minimal context and already have the tools installed. Pick REA for structured, hash-bound evidence and analyzers beyond grep (JS graphs, .NET, Flutter, APK, version comparison). On our demo, both found the same IPC handler.
Sources: OpenAI Codex CLI · OpenAI Codex MCP · rea.tools get-started · REA installation.md
FAQ
Does REA support Codex?
Yes, the client ID is codex: run rea setup --client codex and restart Codex.
Where does Codex store the REA config?
Under CODEX_HOME, which defaults to ~/.codex when unset or empty.