codex-cli-runtime — Claude Code skill: install
An internal skill that forwards Claude Code tasks to codex-companion through the codex:codex-rescue subagent.
npx skills add openai/codex-plugin-cc --skill codex-cli-runtime -a claude-codeWhat codex-cli-runtime does
codex-cli-runtime defines how Claude Code calls codex-companion. It is restricted to the codex:codex-rescue subagent, which sends a request through scripts/codex-companion.mjs with the task action and returns stdout unchanged.
The rescue subagent makes one task call for each handoff. It handles --resume, --fresh, --model, and --effort before forwarding the request, and maps spark to gpt-5.3-codex-spark. A write-capable run is the default unless the user asks for read-only work, review, diagnosis, or research.
This is an internal contract, not a standalone command. That restriction matters when you wire it into a workflow. The helper runs with node "${CLAUDE_PLUGIN_ROOT}/scripts/codex-companion.mjs" task "<raw arguments>"; the rules also prevent Claude Code from inspecting the repository or doing follow-up work.
What it helps with
- forward a Claude Code task to Codex
- continue a previous rescue run with
--resume - run a task with a selected Codex model
- separate write-capable work from read-only review
Example prompts for the agent
- Call `codex:codex-rescue` and pass this task: inspect the failing tests in `src/` and fix the cause.
- Call `codex:codex-rescue` with `--resume` to continue the previous task and apply its top fix.
- Call `codex:codex-rescue` with `--model spark` to investigate the error without editing files.
How to install codex-cli-runtime
1Skills CLI (Vercel)
npx skills add openai/codex-plugin-cc --skill codex-cli-runtime -a claude-code2Manually: put the files in place
~/.claude/skills/codex-cli-runtime/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/codex-cli-runtime/
1Skills CLI (Vercel)
npx skills add openai/codex-plugin-cc --skill codex-cli-runtime -a codex2Manually: put the files in place
.agents/skills/codex-cli-runtime/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add openai/codex-plugin-cc --skill codex-cli-runtime -a cursor2Manually: put the files in place
.cursor/skills/codex-cli-runtime/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install openai/codex-plugin-cc codex-cli-runtime2Manually: put the files in place
.github/skills/codex-cli-runtime/SKILL.md1Skills CLI (Vercel)
npx skills add openai/codex-plugin-cc --skill codex-cli-runtime -a gemini-cli2Platform CLI
gemini skills install https://github.com/openai/codex-plugin-cc --path plugins/codex/skills/codex-cli-runtimeManually: put the files in place
.devin/skills/codex-cli-runtime/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add openai/codex-plugin-cc --skill codex-cli-runtime -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set3
The whole set →Similar
Questions about codex-cli-runtime
How do I install codex-cli-runtime in Claude Code?
Run npx skills add openai/codex-plugin-cc --skill codex-cli-runtime -a claude-code, then run the same command again: npx skills add openai/codex-plugin-cc --skill codex-cli-runtime -a claude-code. The skill file is at ~/.claude/skills/codex-cli-runtime/SKILL.md.
What does codex-cli-runtime do?
It defines an internal contract for the codex:codex-rescue subagent. The subagent calls codex-companion once with the task action and returns its stdout unchanged.
Can codex-cli-runtime handle review without editing files?
Yes. The --write flag is omitted for review, diagnosis, or research. Regular tasks use a write-capable run by default.
Source text
SKILL.md · Apache-2.0
---
name: codex-cli-runtime
description: Internal helper contract for calling the codex-companion runtime from Claude Code
user-invocable: false
---
# Codex Runtime
Use this skill only inside the `codex:codex-rescue` subagent.
Primary helper:
- `node "${CLAUDE_PLUGIN_ROOT}/scripts/codex-companion.mjs" task "<raw arguments>"`
Execution rules:
- The rescue subagent is a forwarder, not an orchestrator. Its only job is to invoke `task` once and return that stdout unchanged.
- Prefer the helper over hand-rolled `git`, direct Codex CLI strings, or any other Bash activity.
- Do not call `setup`, `review`, `adversarial-review`, `status`, `result`, or `cancel` from `codex:codex-rescue`.
- Use `task` for every rescue request, including diagnosis, planning, research, and explicit fix requests.
- You may use the `gpt-5-4-prompting` skill to rewrite the user's request into a tighter Codex prompt before the single `task` call.
- That prompt drafting is the only Claude-side work allowed. Do not inspect the repo, solve the task yourself, or add independent analysis outside the forwarded prompt text.
- Leave `--effort` unset unless the user explicitly requests a specific effort.
- Leave model unset by default. Add `--model` only when the user explicitly asks for one.
- Map `spark` to `--model gpt-5.3-codex-spark`.
- Default to a write-capable Codex run by adding `--write` unless the user explicitly asks for read-only behavior or only wants review, diagnosis, or research without edits.
Command selection:
- Use exactly one `task` invocation per rescue handoff.
- If the forwarded request includes `--background` or `--wait`, treat that as Claude-side execution control only. Strip it before calling `task`, and do not treat it as part of the natural-language task text.
- If the forwarded request includes `--model`, normalize `spark` to `gpt-5.3-codex-spark` and pass it through to `task`.
- If the forwarded request includes `--effort`, pass it through to `task`.
- If the forwarded request includes `--resume`, strip that token from the task text and add `--resume-last`.
- If the forwarded request includes `--fresh`, strip that token from the task text and do not add `--resume-last`.
- `--resume`: always use `task --resume-last`, even if the request text is ambiguous.
- `--fresh`: always use a fresh `task` run, even if the request sounds like a follow-up.
- `--effort`: accepted values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`.
- `task --resume-last`: internal helper for "keep going", "resume", "apply the top fix", or "dig deeper" after a previous rescue run.
Safety rules:
- Default to write-capable Codex work in `codex:codex-rescue` unless the user explicitly asks for read-only behavior.
- Preserve the user's task text as-is apart from stripping routing flags.
- Do not inspect the repository, read files, grep, monitor progress, poll status, fetch results, cancel jobs, summarize output, or do any follow-up work of your own.
- Return the stdout of the `task` command exactly as-is.
- If the Bash call fails or Codex cannot be invoked, return nothing.
© openai · Apache-2.0 · openai/codex-plugin-cc