Skip to content
Back to skills

Codex Cli Runtime

ASecurity

Internal contract the stereo:codex-rescue subagent follows to call the codex-companion runtime; the main session does not load it

  • 6 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 6, 2026
developmentgoshellbashnodegit

Works with

  • cli

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add vsladkov/claudex-stereo --skill codex-cli-runtime --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Codex Cli Runtime?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Codex Cli Runtime
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vsladkov-codex-cli-runtime/badge)](https://www.skillsdirectory.com/skills/vsladkov-codex-cli-runtime)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: codex-cli-runtime
description: Internal contract the stereo:codex-rescue subagent follows to call the codex-companion runtime; the main session does not load it
user-invocable: false
---

# Codex Runtime

Use this skill only inside the `stereo:codex-rescue` subagent.

Primary helper: the flags as separate arguments, the task text on stdin through a quoted heredoc:

```bash
node "${CLAUDE_PLUGIN_ROOT}/scripts/codex-companion.ts" task <taskFlags> <<'STEREO_EOF'
<task text>
STEREO_EOF
```

- `<taskFlags>` is each routing flag as its own argument, in this order when present: `--write`,
  `--background`, `--resume` (or `--resume-last`) or `--fresh`, `--model '<selection>'`, and
  `--effort '<effort>'`,
  every value single-quoted (an embedded `'` becomes `'"'"'`). Nothing else goes on the command
  line: never put the task text, or any other user text, in an argument or a shell string.
- The task text (the user's request with the routing flags removed, or the prompt the
  `codex-prompting` skill tightened from it) goes between the heredoc lines verbatim. The quoted
  delimiter `'STEREO_EOF'` keeps the shell from expanding anything inside it. If a line of the text
  is exactly `STEREO_EOF`, append digits to the delimiter (`STEREO_EOF_2`) on both lines until no
  line of the text matches it. With `--resume` and no new text, omit the heredoc.
- Run the Bash call with a `timeout` of 600000 ms (the tool's maximum): a foreground rescue task
  routinely outlasts the default two minutes.

Execution rules:

- The rescue subagent is a forwarder, not an orchestrator. Its only job is to invoke `task` once and return that stdout unchanged.
- Call only the helper: no hand-rolled `git`, no direct Codex CLI strings, no other Bash activity.
- Do not call `setup`, `review`, `adversarial-review`, `status`, `result`, or `cancel` from `stereo:codex-rescue`.
- Use `task` for every rescue request, including diagnosis, planning, research, and explicit fix requests.
- You may use the `codex-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, and then forward the value verbatim. Never invent an effort the user did not ask for.
- Leave model unset by default. Add `--model` only when the user explicitly asks for one, then pass that value through verbatim, with or without its `codex:` prefix.
- The companion resolves and validates the model and the effort itself. Never resolve, expand, or check either value; a value the companion refuses comes back as the failure line below.
- 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.
- The Agent invocation and Bash call are always foreground. Strip `--wait` and make a foreground
  `task` call; map `--background` to `task --background`. Neither flag is part of the
  natural-language task text.
- If the forwarded request includes `--model`, pass its value to `task` as `--model '<selection>'`
  without expanding aliases.
- If the forwarded request includes `--effort`, pass its value to `task` as `--effort '<effort>'`.
- Forward `--resume` and `--fresh` to `task` unchanged as flags, never as task text; the CLI
  accepts both directly (`--resume` is an alias of `--resume-last`). `--resume` always resumes,
  and `--fresh` always runs fresh, even when the request text is ambiguous.
- `--effort`: the values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`, `ultra`.
- `task --resume-last`: internal helper for "keep going", "resume", "apply the top fix", or "dig deeper" after a previous rescue run; it continues this session's latest rescue thread.

Safety rules:

- Forward the user's task text unchanged apart from the routing flags, unless you tighten it with the `codex-prompting` skill; a tightened prompt keeps the user's meaning and scope.
- 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 exactly
  `Codex rescue failed: <first line of the error>. Run /stereo:setup to check the Codex CLI.` and
  add nothing else.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.