Setup guide
How to use Codex with Roblox Studio
Codex writes solid Luau and is genuinely good at working through an existing codebase. Pointing it at a Roblox game is a different problem: it has to reach a running Studio session, and Codex handles configuration and session state differently enough from other CLIs that the usual instructions do not transfer.
Same bridges, different plumbing. Every agent needs Roblox Studio's built-in MCP server plus a plugin that carries file changes and console output out of Studio. The Claude Code guide covers those shared steps in full; this page is about the three things Codex does its own way.
1. MCP config is global, not per project
Claude Code reads a .mcp.json next to your project. Codex does not — its servers live in a single global ~/.codex/config.toml. The right way to add one is Codex's own command, not a text editor:
codex mcp add baseplate --url "http://127.0.0.1:34901/mcp?ws=<url-encoded-workspace-path>"
# check it landed
codex mcp list
# reversible, any time
codex mcp remove baseplate
That writes an [mcp_servers.baseplate] entry, and re-running it with a different URL overwrites the old one — which matters, because the ?ws= parameter has to follow whichever project you are actually working on. Hand-merging that TOML is the one thing worth avoiding: a bad edit takes your other Codex settings with it.
Consequence of “global”: two Roblox projects open at once cannot both own the entry. Whatever tooling you use has to rewrite the URL when you switch projects — Baseplate does this on workspace switch, which is the only reason it is not a daily annoyance.
2. codex exec is one-shot
claude -p keeps one process alive and accepts further prompts on stdin. codex exec does not: each turn is a new process that runs and exits. Continuity comes from resuming a thread explicitly.
# first turn — note the thread id in the thread.started event
codex exec "Find why the shop remote rejects valid purchases"
# every turn after that
codex exec resume <thread_id> "Now write the fix and re-run the playtest"
For a playtest loop this is the detail that decides whether the whole thing works. The agent has to carry what it learned from the failing run into the fix and into the re-test; drop the thread and it starts over from a blank slate, re-reading files it already understood.
3. The Windows launch trap (exit code 193)
If Codex refuses to start on Windows with exit status 193, it is not a broken install. 193 means “not a valid Win32 application” — something tried to execute a file Windows cannot run directly. The usual culprit is a PATH lookup that returns a Unix-style shell script beginning with #!/bin/sh ahead of the .cmd shim npm actually installs.
The fix is to resolve the .cmd shim explicitly instead of trusting the first PATH hit — or to point your tooling at the full binary path. If you have installed Codex somewhere unusual, Baseplate takes an explicit override:
BASEPLATE_CODEX_BIN=/full/path/to/codex
Worth knowing generally: a GUI-launched app does not inherit your shell's PATH, which is why a CLI that works in your terminal can appear “not installed” to a desktop app.
What Codex can do once it reaches Studio
With the bridge live, Codex runs the same verified loop as Claude Code: run the game, read the real Output, find the cause in your source, edit src/, let Rojo sync it into the open place, then playtest again and only claim PASS on a clean rerun. It qualifies because its JSONL event stream — thread.started, turn.started, item events, turn.completed — makes tool calls checkable rather than merely narrated.
Baseplate can also mix engines inside one crew, so Codex and Claude Code can build in parallel with enforced file ownership. Grok Build runs fine as a builder tile but does not expose tool-call evidence, and Gemini CLI has no verified structured mode, so neither can produce a proven PASS.
Honest limits
- You bring your own Codex account. Baseplate orchestrates the CLI you already pay for and adds no token markup.
- A real Studio session has to be open for verified playtests — there is no headless Roblox.
- The global MCP config is shared with every other Codex project on the machine. That is Codex's design, not something a wrapper can hide.
- Review before shipping. Fixing a runtime error is not a security audit — run the RemoteEvent checklist first.
Point Codex at a Studio it can actually see
Baseplate wires the MCP entry, installs the Studio plugin and runs the verified playtest loop. Free plan, one agent, your own Codex account.
Download Baseplate free