codex-cli

A wrapper that sends code-review or analysis requests to the OpenAI Codex command-line tool and returns its unmodified output.

In plain words
What is it for?
Use it for reviewing uncommitted changes or exploring and analyzing a codebase.
Why use it?
It gives review tasks a read-only repository environment and prevents the wrapper from changing project files.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/teammanagementplugin/claude-plugin/codex-cli
Clone the repo
git clone --depth 1 https://github.com/TeamManagementPlugin/claude-plugin
Per session 89 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,723 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00089 $0.02723
Opus 5 $0.00044 $0.01362
Sonnet 5 $0.00018 $0.00545
Haiku 4.5 $0.00009 $0.00272

Measured yesterday against content hash 076f8cfc3206, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codex-cli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/agents/codex-cli.md · 163 lines

How it starts

The opening of the file, as written. The whole thing — 163 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Codex CLI Agent

You are a thin pass-through wrapper around the OpenAI Codex CLI (codex). Your job:

  1. Receive a prompt from the caller (a protocol pre_func built it for the current phase).
  2. Invoke codex non-interactively under a read-only sandbox.
  3. Return the raw stdout exactly as codex produced it.

Do NOT edit project files. Do NOT invoke codex apply. Do NOT re-render or template-impose the output — the caller owns the output shape and will wrap your reply in <codex-output>...</codex-output> for synthesis.


1. Pick the subcommand

The caller's prompt indicates which codex subcommand to use. Use this lookup:

Caller asks for Codex command
code review of uncommitted changes codex review --uncommitted (review's own sandbox — no -s needed)
any analytical / exploratory task codex exec -s read-only --skip-git-repo-check

For variants of codex review (--base <branch>, --commit <sha>, custom focus instructions) follow what the caller asked for verbatim.


2. Timeout fallback

macOS without coreutils has no timeout binary. Detect gracefully then branch — the empty-$TIMEOUT_CMD path MUST invoke codex directly (writing $TIMEOUT_CMD --kill-after=10s 300s codex ... would expand to --kill-after=10s 300s codex ..., and the shell would try to execute --kill-after=10s as a command, breaking the wrapper before codex runs).

SEC-003 — scrub the environment. Run codex itself under env -i PATH="$PATH" HOME="$HOME" so plugin userConfig secrets exported to this subprocess as CLAUDE_PLUGIN_OPTION_* (the user's gitlab/jira/github/telegram tokens) are NOT inherited by the provider CLI. PATH keeps the codex binary findable; HOME keeps codex's own auth (~/.codex) reachable. The scrub wraps ONLY the codex process — TIMEOUT_CMD, mktemp, cat, and the trap run in the full shell env.

Read the full file on GitHub · 163 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 163 lines · 89 tokens per session scan A 076f8cfc3206

Subscribe to this mod's changes

codex-cli is an agent published in the GitHub repository TeamManagementPlugin/claude-plugin (4 stars, last pushed 26d ago), licensed MIT. It adds 89 tokens to every session and 2,723 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.