codex
Reviewed
at commit 1838521
New version, not yet reviewed
Caution: Lets Codex's own AI reviewer approve sandbox escalations by default, and a project's .claude/codex.json can switch Codex jobs to no sandbox and no approvals.
Sends data to OpenAI Codex (OpenAI servers, through your local Codex CLI and OpenAI account)
Run OpenAI Codex jobs as native background subagents (codex:luna, codex:sol, codex:astra, codex:terra): the native task list, SendMessage, TaskStop and finish…
0 upvotes
Log in to upvote or save- Made by
- SSS135
- Pinned commit
-
18385214f25bc526b836fb691065cc600054fcd1 - What we checked
-
Adds codex:luna, codex:sol, codex:astra and codex:terra background agents: Claude hands a task to your local OpenAI Codex CLI, which sends the prompt to OpenAI on your own account and edits your project inside Codex's sandbox. A background helper process relays Codex's approval requests as dialogs and passes messages between agents. Job records, including Codex's final answers, are saved under ~/.claude/plugins/codex-agents, with logs in a temp folder.
Review details
Static review of the source at the pinned commit; not run. hooks.json loads hooks/register.tsx, which registers session.start (registers the codex_list, codex_result, codex_stop and codex_await tools and the four codex:* agent types, reads the nearest .claude/codex.json, starts the bridge), agent.spawn (for codex:* types starts a Codex thread and turn with the Agent prompt, header lines effort/sandbox/approvals stripped), turn.step (answers every step of the codex:* wrapper subagent itself, so no Claude model runs for it), session.append, session.send (routes SendMessage to a Codex job as a steer or new turn), tool.check on SendMessage (returns allow only for the SendMessage calls the plugin itself generated to relay a Codex message verbatim), turn.complete (TaskStop interrupts the Codex turn and its sub-agents), tool.call for its own tools, tool.describe, and ui.render for its tool rows and the PromptHint line. Runtime calls: $.process.spawn of node bin/bridge.mjs, $.process.run of node -e setTimeout as a budget-free pause, $.http.fetch only to the bridge's Unix socket or, on Windows, a 127.0.0.1 port behind a random secret, $.fs.exists/read (codex.json, configured binary paths), $.env.get NODE_OPTIONS (drops preloads of missing files), $.store, $.state, $.ui.ask (approval dialogs, one at a time, dismissal is deny), $.ui.log, $.agent.list/register, $.tool.register/list, $.session.messages. bin/bridge.mjs (read fully) runs codex --version, launches a detached daemon that runs codex app-server --listen stdio:// and serves HTTP on /tmp/cxb-<uid>/<key>-<build>/s (mode 0700) or %TEMP%\cxb, logs lifecycle lines beside it, exits 20 s after Claude Code exits or after 10 min idle, kills only daemons whose recorded pid matches in its own directory, and on Windows may run powershell Get-AppxPackage OpenAI.Codex and taskkill. bin/registry.mjs (read fully) writes one JSON record per job (name, cwd, model, final message, a digest of commands and file changes) to ~/.claude/plugins/codex-agents and serves read/write on a secret 127.0.0.1 port. bin/codex-msg (read fully from the clone; it is not in the bundle) is an MCP server Codex starts per thread outside the job's sandbox; it only posts message_agent/list_agents to the bridge. Permissions: default sandbox workspace-write; default approvals auto, which sets approvalsReviewer auto_review so Codex's own reviewer decides escalations without asking (README: it approved writes outside the workspace in testing); ask shows Allow once/session/always/Deny dialogs, and Allow always makes Codex append a prefix_rule to ~/.codex/rules/default.rules that applies to every Codex session (disclosed). yolo (danger-full-access, approvalPolicy never) cannot be a userConfig default but can be set by a prompt header, which the agent description tells Claude to use only on an explicit user request, or by a project's .claude/codex.json, so an opened repository can turn it on. Elicitation requests are declined, unknown server requests refused. Prompts and project contents reach OpenAI through the Codex CLI, which was not reviewed; nothing in the plugin contacts a non-loopback host itself. register.tsx, bridge.mjs, registry.mjs, codex-msg, plugin.json and types were read in full; hooks/model.ts (pure logic) was read in full for parameters, approvals, project config, header parsing and messaging, the remaining text formatting by targeted search.
- What it uses
-
- Reads your prompts: no
- Sees tool calls: yes
- Blocks or changes tool calls: yes
- Reads or writes files: yes
- Runs programs on your machine: yes
- Calls the model (uses tokens): no
- Sends data over the network: yes
- Stores data: yes
- Shows something on screen: yes
- Hooked events
Run OpenAI Codex jobs as native background subagents (codex:luna, codex:sol, codex:astra, codex:terra): the native task list, SendMessage, TaskStop and finish notifications, with Codex approval requests as Claude Code dialogs.
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/codex/)