Skip to content
docs / codex
Releases ← Back to site GitHub

Use with Codex CLI

The plugin also works with OpenAI’s Codex CLI. Turn on Codex support and a codex session in your project gets an MCP server for the Unreal tools plus the cu CLI for the long tail — no manual config editing.

  • The Unreal CLI Bridge for Codex edition — a second Fab product built from the same source. Codex support is on by default.
  • The Claude Unreal edition — turn it on yourself: Project Settings → Plugins → Claude Unreal → Agents → Codex support, or the toolbar’s Claude button → its arrow → AGENTS → Codex support.
WritesWhereNotes
MCP server registrationCodex’s global config, via codex mcp addNamed unreal-<ProjectName>
AGENTS.mdproject rootGenerated from CLAUDE.md; the Codex counterpart of Claude Code’s CLAUDE.md
.codex/cuproject rootThe same cu CLI wrapper as Claude Code’s .claude/cu, with a sandbox-writable uv cache
.codex/config.tomlproject rootA complete MCP server table plus sandboxed network access — shown below

Turning Codex support off removes only what the plugin wrote and you did not edit.

.codex/config.toml looks like this (placeholders in angle brackets):

# claude-unreal:managed 0a1b2c3d
# Written by <displayName> when Codex support is turned on. Edit freely: an edited copy is never overwritten or removed.
# Codex reads this file only once you trust the project.
[sandbox_workspace_write]
network_access = true
[mcp_servers.unreal-<Project>]
command = "<uv>"
args = ["--directory", "<MCP dir>", "run", "<server script>"]
default_tools_approval_mode = "approve"

Codex reads .codex/config.toml only in trusted projects — say yes when codex asks to trust this folder.

In an untrusted project, tools still load from the global registration, but every call asks for approval, and .codex/cu cannot reach the editor from the sandbox.

  • Network access for sandboxed commands in this project — all outbound network, not only loopback. Codex has no loopback-only switch, and .codex/cu needs network access to reach 127.0.0.1:55557.
  • Auto-approval of the unreal-<ProjectName> tools — the Codex counterpart of the allow rules Claude support writes to .claude/settings.local.json. These tools run inside the editor process, outside Codex’s sandbox: they can change or delete things in the open level, just as when you approve each call by hand.

Delete or edit the file to opt out of either. An edited file is never overwritten.

  • Run .codex\cu.cmd, not .codex/cu. The extension-less .codex/cu is a POSIX shell script; from PowerShell use .\.codex\cu.cmd ping. The generated AGENTS.md tells Codex the same.

  • Mind PowerShell’s quoting for JSON params. PowerShell strips the double quotes from arguments it passes to a .cmd file, so --params-json '{"name": "X"}' reaches cu as {name: X} and fails to parse. Prefer typed flags (.\.codex\cu.cmd exec exec_console_command --command "stat fps") or --params-file params.json (write the file with Set-Content, not >). If you do need --params-json, write each " inside the JSON as \". The generated AGENTS.md gives Codex the same rules.

  • Set a Codex sandbox mode. Without one, Codex rejects every shell command as blocked by policy, so the MCP tools work but cu does not. Set it in your Codex config:

    [windows]
    sandbox = "unelevated"
  1. Open the UE editor with the plugin loaded.
  2. Run codex in the project directory.
  3. Ask it to call the ping tool.
  4. Ask it to run .codex/cu ping.

Both should succeed once the project is trusted.

  • Codex MCP servers are global. The global entry unreal-<ProjectName> is shared by every checkout with that project name; in a trusted project, .codex/config.toml overrides it with this checkout’s path. Entries for moved or deleted projects stay registered until you run codex mcp remove unreal-<ProjectName>.
  • Re-registration rewrites the global entry. The plugin re-runs codex mcp add only when the registered entry is missing or out of date, and codex mcp add rewrites that entry: hand-added fields such as env, and comments directly above the table, are dropped. Keep your own settings (for example startup_timeout_sec) in .codex/config.toml instead.
  • An edited .codex/config.toml is frozen. Once you edit the file, the plugin never updates it again. If the plugin’s path changes (for example after reinstalling it for another engine version), update the args path yourself, or delete the file so the plugin rewrites it — in a trusted project, a stale table overrides the global entry.
  • No slash commands, prompts, or skills for Codex. The kit and wall workflows are plain Markdown guides the agent reads directly (Resources/Commands/kit.md, wall.md).
  • No castle blockout kit. The Codex edition ships without the bundled Content/ kit; castle tools report that the default kit could not be copied — point them at your own kit.
  • Windows: a project folder named like a defined environment variable. If a folder in the project path is literally named like one, for example %USERNAME%, running cu.cmd by an absolute path fails: cmd expands the batch file’s own path before it reads the file. The MCP tools are not affected.