Codex Subagent

Launch OpenAI Codex CLI as a subagent (ChatGPT subscription auth, no API key). Use when delegating a self-contained coding task to Codex from another agent — parallel implementation work, a second opinion, or an independent verification pass.

4,336 stars 628 forksAI, LLMs & Agents

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add davidondrej/skills --skill codex-subagent
Manual install
git clone --depth 1 https://github.com/davidondrej/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/skills/codex-subagent ~/.claude/skills/codex-subagent

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Codex CLI as a Subagent

Codex CLI is OpenAI's terminal coding agent. `codex exec` runs it non-interactively:
it works autonomously in a sandbox, streams progress to stderr, and prints only the
final message to stdout. Auth reuses the user's ChatGPT subscription — never an API key.

## When to delegate

- Self-contained coding task with clear success criteria (fix, feature, refactor, review).
- Parallel work: several independent tasks at once (see Parallel runs).
- Second opinion / independent verification of your own changes.

Do NOT delegate tasks that need conversation context you can't fully write into the prompt.

## Preflight

```bash
codex --version       # missing? npm i -g @openai/codex  (or: brew install --cask codex)
codex login status    # exit 0 + "Logged in using ChatGPT" = ready
```

Not logged in → stop and tell the user to run `codex login` (one-time browser OAuth).
Never read, print, or copy credentials (`~/.codex/auth.json`).

## Launch

```bash
OUT=$(mktemp /tmp/codex-out.XXXXXX)
codex exec \
  --cd /path/to/repo \
  --model gpt-5.6-sol \
  --config model_reasoning_effort=high \
  --sandbox workspace-write \
  --output-last-message "$OUT" \
  "Full task prompt: goal, constraints, files to touch, definition of done." \
  </dev/null
```

- Always use GPT 5.6 Sol (`gpt-5.6-sol`). Default reasoning effort to `high`.
  Pass both flags explicitly on every new Codex run.
- Do NOT use Codex fast mode.
Read the full skill on GitHub

Details

Skill name
codex-subagent
Path
skills/codex-subagent/SKILL.md
License
MIT
Repo updated
17 November 2026

FAQ

What does the Codex Subagent skill do?

Launch OpenAI Codex CLI as a subagent (ChatGPT subscription auth, no API key). Use when delegating a self-contained coding task to Codex from another agent — parallel implementation work, a second opinion, or an independent verification pass.

How do I install the Codex Subagent skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add davidondrej/skills --skill codex-subagent. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Codex Subagent popular?

It lives in davidondrej/skills, which has 4,336 GitHub stars and 628 forks.

Related skills

Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.