codex-cli-runtime

codex-cli-runtime is a skill for Claude Code from okisdev/claude-code-fusion. It costs 15 tokens per session (1,952 once invoked), scanned A, original, MIT.

An internal set of rules for running the Codex companion runtime, including its task, review, status, result, cancellation, and setup commands.

In plain words
What is it for?
Use it when another tool needs to invoke Codex for coding tasks, reviews, background jobs, or runtime setup.
Why use it?
It defines how Codex jobs are started, monitored, resumed, and returned consistently.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions Claude Code; runs codex exec; mentions Codex.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the codex plugin — 3 skills, 1 agent shipped together

Good fit Use it when another tool needs to invoke Codex for coding tasks, reviews, background jobs, or runtime setup.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add okisdev/claude-code-fusion
Claude Code
/plugin install codex

Made for: Claude Code.

Or install codex, the plugin that ships this one along with the rest of its 3 skills, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codex-cli-runtime

README.md
[![agentmods](https://agentmods.dev/badge/skills/okisdev/claude-code-fusion/codex-cli-runtime/github.svg)](https://agentmods.dev/skills/okisdev/claude-code-fusion/codex-cli-runtime)
Your own site
<a href="https://agentmods.dev/skills/okisdev/claude-code-fusion/codex-cli-runtime"><img src="https://agentmods.dev/badge/skills/okisdev/claude-code-fusion/codex-cli-runtime/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codex-cli-runtime

Your own site · 80×15
<a href="https://agentmods.dev/skills/okisdev/claude-code-fusion/codex-cli-runtime"><img src="https://agentmods.dev/badge/skills/okisdev/claude-code-fusion/codex-cli-runtime.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,952 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00015 $0.01952
Opus 5.5 $0.00006 $0.00781
Sonnet 5.5 $0.00003 $0.00390
Haiku 4.5 $0.00002 $0.00195

Measured 2d ago against content hash 4fa6643724ac, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

codex-cli-runtime 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 2d ago.

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.

plugins/codex/skills/codex-cli-runtime/SKILL.md · 50 lines

How it starts

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

Codex runtime

Primary helper:

  • node "${CLAUDE_PLUGIN_ROOT}/scripts/codex-companion.mjs" <subcommand> [flags]

Subcommand surface:

  • task [--prompt-file <path>] [--output-schema <path>] [--write] [--background] [--resume <thread-id>|--resume-last|--fresh] [--model <id>] [--effort <level>] [--web] [--cwd <dir>] [--json] [--] [prompt]
  • review [--scope <auto|working-tree|branch>] [--base <ref>] [--focus <text>] [--background] [--model <id>] [--effort <level>] [--cwd <dir>] [--json]
  • adversarial-review [--scope <auto|working-tree|branch>] [--base <ref>] [--focus <text>] [--background] [--model <id>] [--effort <level>] [--cwd <dir>] [--json]
  • status [job-id] [--all] [--cwd <dir>] [--json]
  • history [--json]
  • result <job-id> [--wait] [--wait-timeout-ms <ms>] [--cwd <dir>] [--json]
  • cancel <job-id> [--cwd <dir>] [--json]
  • setup [--cwd <dir>] [--json]

Execution rules:

  • Programmatic orchestrators pass the complete opaque raw request through stdin with node "${CLAUDE_PLUGIN_ROOT}/scripts/codex-companion.mjs" task --request-stdin. A write default uses task --transport-default-write --request-stdin. The fixed argv contains no request bytes, and stdin must close after the complete request is written. The same ingress option works with review, status, result, cancel, history, and setup. Slash commands whose Bash tool has no stdin field keep using the private token staging compatibility path: transport-create, one Read of the allocated empty file, Write to that same file, then a fixed --raw-args-token invocation. Never delete, rename, recreate, or change the permissions of the transport file; use transport-discard when Read or Write fails or when the allocated file is not empty.

  • A forwarder agent runs the companion in one background shell: a Bash call with run_in_background: true, which returns at once with a background id and the path of the output file. It then runs node "${CLAUDE_PLUGIN_ROOT}/scripts/codex-companion.mjs" await-output --file "PATH" in a foreground Bash call with timeout: 120000 and repeats that call while it prints exactly await-output: pending; any other output is the complete stdout of the launched operation. The harness delivers one report per agent, so a forwarder never ends its turn or writes a waiting line while the await operation prints pending. Background mode belongs to that Bash call alone and is neither the Agent's own background mode nor the companion's --background. The rescue agent adds the fixed option --transport-background-shell to its task launch. A companion run directly by the main session through a slash command, with no forwarder agent, is a foreground Bash call with timeout: 600000.

  • Place every task option before the first prompt token. Use -- before a prompt that begins with an option shaped token.

  • Task, review, and adversarial review reject an implicit working directory below its repository top level before job creation. Pass --cwd with either the repository root or the intended subdirectory to choose the sandbox root explicitly.

  • The companion forwards --skip-git-repo-check to Codex exec. For a task with no ancestor .git entry, a read only consult automatically receives that flag because it cannot write. A write task receives the flag automatically when --cwd is explicit; with an implicit cwd it fails before job creation unless the request explicitly includes the flag. The projects trust map in config.toml is not consulted by exec. A gate failure names --skip-git-repo-check as the remedy.

  • Complexity, duration, and model choice never justify the companion's --background.

  • Pass --background only when the received request explicitly contains it. The companion owns detachment and returns a durable job receipt.

  • A direct slash command invocation returns that receipt for a per-job watch and result collection. Direct users inspect progress through status and collect the deliverable through result. Fusion orchestration separately owns one same turn collection attempt capped at 540000ms for jobs it creates. A timeout remains explicitly uncollected.

  • A task is read only unless --write is present. Review commands are always read only.

  • A write task in a SwiftPM package prepends an environment note instructing Codex to use swift build --disable-sandbox and swift test --disable-sandbox because SwiftPM cannot nest its sandbox inside Codex's sandbox.

  • Leave --model and --effort unset unless explicitly requested so Codex configuration remains authoritative.

  • Use --resume <thread-id> only with a real thread identifier returned by Codex. Use --resume-last for the newest eligible task thread launched by the current Claude session, or the newest eligible workspace task when no Claude session id is available.

  • A task failure of timeout, policy, patch_thrash, or died with a resumable thread is salvaged by the wrapper's single scripted wind down resume, launched and awaited like the task. The printed command preserves write mode; the resumed job links through request.resumeThreadId and request.resumeSourceJobId, and a second failure terminalizes the package.

  • A job whose resolved model differs from an explicit --model request records modelDrift with requestedModel and resolvedModel and renders a warning line on the terminal output and on result; a task whose brief header names a model while --model is unset records the existing header drift shape.

  • Use --fresh only when the caller explicitly requests a new thread. It cannot be combined with either resume form.

  • Use --web only when explicitly requested. Write tasks always have workspace network access for DNS, HTTPS, localhost listeners, and authenticated gh. Read-only tasks have no workspace network access.

  • Use --output-schema <path> only for task mode. The companion resolves the path, requires a regular JSON file at most 256 KiB, and records one JSON parsing result without retrying the task. Native review ignores output schemas on tested CLI versions. Review shaped task briefs can use ${CLAUDE_PLUGIN_ROOT}/schemas/adversarial-review-verdict.schema.json; adversarial review uses that schema automatically.

  • A manual background receipt relays one absolute node "<plugin root>/scripts/codex-companion.mjs" watch --job <id> command to the main session for one Claude Code Monitor tool watch. Its single completion line is the cue to collect through /codex:result <id>. Watches poll every 15 seconds, stay silent while running, exit 0 on terminal state, and fail nonzero for unknown ids. Fusion orchestrated detached jobs retain fusion:job-collector. Request the receipt's watch duration, the engine background budget plus 60 seconds capped at 30 minutes. If a Monitor deadline notice arrives before the completion line, re-arm the same watch command with the same duration. Re-arm it on a still running line too; each watch exits with that line after at most 29 minutes. Each poll runs the engine's status and result liveness reconciliation. A dead owner is announced as orphaned; unverified cleanup or a job still running past its deadline plus 15 seconds is announced as cleanup required, with result and cancel commands.

  • result --wait performs a bounded wait. When the wait budget expires while the job is still active, it leaves the job unchanged and returns output ending in job: <id> and state: running.

  • Terminal output has the Codex thread identifier when available, then the job identifier and any resumed-from: source, followed by sandbox, delivery, semantic, structured, and warning lines when applicable. It ends with state: done, state: error, or state: cancelled; error and cancelled outcomes end with failure: <kind> immediately after state:.

  • Every companion invocation disables the Codex multi_agent, multi_agent_v2, sleep_tool, memories, and goals features. A collaboration tool event, or a rollout that resolved to the persistent reasoning effort, fails the job as policy even if an upstream configuration bypasses those flags.

  • history reads only the current canonical state root and exposes thread, transport, delivery, semantic, resolved model, and resolved effort fields. Exec sessions remain persisted and resumable locally, but Codex Desktop does not guarantee sidebar visibility for them.

  • Return helper stdout exactly as received. Do not interpret it or replace a failed run with Claude-side work.

Read the full file on GitHub · 50 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. 2d ago Changed 4fa6643724ac
  2. 10d ago Changed · +1 lines 9c0f207d11e3
  3. 12d ago Changed · -1 lines 5a8e1e636a02
  4. 18d ago Changed 8f68eb8c499f
  5. 2mo ago Changed · +1 lines 2cb381a6399a
  6. 2mo ago Changed 488d110ffae5
  7. 2mo ago Changed · +1 lines 4c257f5865e0
  8. 3mo ago First seen · 48 lines · 15 tokens per session scan A e6b88afdca7e

Subscribe to this mod's changes

codex-cli-runtime is a skill published in the GitHub repository okisdev/claude-code-fusion (3 stars, last pushed 3d ago), licensed MIT. It adds 15 tokens to every session and 1,952 once invoked, about $0.0001 per session on Opus 5.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.

Related

codex-cli-runtime compared with skills from other repositories

codex-cli-runtime next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codex-cli-runtimeokisdev/claude-code-fusionSkill33d agoMITA15Claude Code
review-teams977043/river-reviewSkill8todayMITA147Claude Code
conductor-orchestratorIbrahim-3d/orchestrator-supaconductorSkill3842mo agoAGPL-3.0A101Claude Code
message-busIbrahim-3d/orchestrator-supaconductorSkill3842mo agoAGPL-3.0A44Claude Code
writing-skillsIbrahim-3d/orchestrator-supaconductorSkill3842mo agoAGPL-3.0A20Claude Code
parallel-dispatchIbrahim-3d/orchestrator-supaconductorSkill3842mo agoAGPL-3.0A40Claude Code
agent-factoryIbrahim-3d/orchestrator-supaconductorSkill3842mo agoAGPL-3.0A36Claude Code