Integrations

Codex testing: make Codex prove its change in the running app

Codex testing that checks behaviour, not the agent's summary: verify each Codex CLI change inside the running web app from network, state and console, over MCP.

Updated · Reviewed by the Reticle team

On this page

Codex testing gets reliable when Codex has to show evidence from the running app instead of a summary. Reticle is an MCP server Codex CLI can call: it drives the changed flow in your web app and returns a pass or fail with the network calls, the app state and the console behind it.

Why Codex's own tests are not proof

Codex reads the task, writes the change and usually the tests, runs them and reports. When it misreads the task, the tests carry the same misreading and pass. Its report describes what it intended.

Codex also runs sandboxed with network access off by default. A test that calls a local service or installs a package mid-run fails in a way that looks like a code bug and is not. If Codex cannot reach your running dev server, check the sandbox and network settings before you debug the code. How to use Claude Code and Codex for testing covers the rest of the setup.

Set up Reticle in Codex CLI

Register the MCP server with Codex's own command:

codex mcp add reticle -- npx @reticlehq/server mcp

Or add the block to ~/.codex/config.toml by hand. Reticle's installer never edits this TOML file itself:

[mcp_servers.reticle]
command = "npx"
args = ["@reticlehq/server", "mcp"]

Restart Codex, then add the skill and wire your app from its folder:

npx skills add reticlehq/reticle --skill reticle
npx @reticlehq/server init

init adds the dev-only SDK, writes agent rules to AGENTS.md, and installs a prompt hook in .codex/hooks.json. --dry-run shows the plan and writes nothing. The Reticle README has every flag.

What the verify loop looks like

  1. You give Codex a task.
  2. Codex makes the change and calls Reticle to drive the affected flow.
  3. Reticle reads the requests and their status codes, the state after each step, and the console.
  4. A fail names what broke and, on React and Svelte, the file:line. Codex fixes it and verifies again.
  5. The flow is saved under .reticle/flows/, and npx @reticlehq/server verify <url> replays it in CI with no model in the loop.

Replays are deterministic: one flow replayed eight times gave one verdict all eight times, and a four-flow suite re-verifies in about 480 tokens (benchmark scorecard).

Limits

  • Full depth needs your app. Reticle also works on sites you don't own: it drives the page in its own browser, injects its SDK, and reads network, console, DOM and routing. App state and the file:line source pointer need the SDK built into your own app.
  • Sandbox first. Reticle cannot fix a Codex sandbox that blocks the connection to your dev server; that is a Codex setting.
  • One engine, no pixel diff, source lines on React and Svelte only, as on the Claude Code testing page.

For the browser-driving alternatives Codex can also use, see MCP servers for browser testing.

FAQ

How do I test changes made by OpenAI Codex?

Test changes made by OpenAI Codex with a check Codex does not write. Run the app, drive the changed flow, and read the network calls, state and console rather than its summary. Reticle does this as an MCP server Codex CLI calls, returning a pass or fail with evidence and the source line to fix.

Why do my tests fail in Codex when the code is correct?

Tests can fail in Codex on correct code because Codex runs sandboxed with network access off by default. A test that calls a local service or installs a package mid-run then fails like a code bug. Check the sandbox and network settings before you spend time debugging code that is not broken.

How do I add an MCP server to Codex CLI?

Run codex mcp add <name> -- <command>, for example codex mcp add reticle -- npx @reticlehq/server mcp, or add an [mcp_servers.<name>] block with command and args to ~/.codex/config.toml. Restart Codex afterwards so it loads the new tools before your next session.

Can Codex verify its own work?

Codex can run checks, but it should not be the only judge of its own work. Its code and its tests come from the same reading of the task, so a mistake in that reading passes both. An independent check that reads the running app's requests, state and console is closer to real verification.

Why Reticle

Your agent says it works. Reticle checks.

  • Checks each change inside the running app: network, state and console, not a screenshot.
  • Returns a pass or fail with the evidence and the file:line to fix.
  • Open-source SDK on your machine, or the platform on every preview and PR.

No credit card required.