Skip to content
Skills Library
AI & agents · Tool integration

codex-delegation

/codex-delegation

Delegates tasks to the OpenAI Codex CLI (codex exec) via delegation-core. Use when delegation-core selects Codex or OpenAI credentials are already configured.

Licence
MIT
Last repository change
01.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 01.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Delegates tasks to the OpenAI Codex CLI (codex exec) via delegation-core. Use when delegation-core selects Codex or OpenAI credentials are already configured.

Original author description

Delegates tasks to the OpenAI Codex CLI (codex exec) via delegation-core. Use when delegation-core selects Codex or OpenAI credentials are already configured.

How it works

  1. Overview
  2. When To Use
  3. When NOT To Use
  4. Prerequisites
  5. Quick Start
  6. Smart Delegation
  7. Codex-Specific Details
  8. Exit Criteria
Original SKILL.md headings · 108 lines, 501 words
SKILL.md preview
---
name: codex-delegation
description: Delegates tasks to the OpenAI Codex CLI (codex exec) via delegation-core. Use when delegation-core selects Codex or OpenAI credentials are already configured.
alwaysApply: false
category: delegation-implementation
tags:
- codex
- openai
- cli
- delegation
dependencies:
- delegation-core
tools:
- codex
- delegation_executor.py
usage_patterns:
- codex-cli-integration
- headless-ci-execution
complexity: intermediate
model_hint: standard
estimated_tokens: 550
references:
- delegation-core/shared-shell-execution.md
---

# Codex CLI Delegation

## Overview

OpenAI's Codex CLI ships as npm `@openai/codex` and installs a `codex`
binary. Its headless entry point is `codex exec`, which takes the
prompt as a positional argument and reuses saved CLI credentials.

## When To Use

- `delegation-core` selected `codex` for the task
- OpenAI credentials are already configured on the machine
- The work suits a second opinion from a non-Anthropic, non-Google
  model

## When NOT To Use

- The host is headless and `codex login` has never succeeded there.
  See the login caveat below
- The job checks out untrusted repository code. OpenAI's own docs warn
  against exposing the key as a job-level environment variable in that
  case

## Prerequisites

### Installation

```bash
npm install -g @openai/codex
```

Homebrew and a curl installer are also documented upstream.

### Authentication

Either persist an API key or log in interactively:

```bash
printenv OPENAI_API_KEY | codex login --with-api-key
```

Verification runs `codex login status`, which reports one of "Logged
in using an API key", "Logged in using ChatGPT", "Logged in using
Agent Identity", or "Not logged in". The service uses that probe
rather than checking a single variable, because either credential
path is valid and only the probe sees both.

`CODEX_API_KEY` scopes a credential to a single `codex exec` run.

## Quick Start

### Using the shared delegation executor

```bash
uv run python scripts/delegation_executor.py codex "Explain this module" \
  --files src/
```

### Through the Makefile

```bash
make -C plugins/conjure delegate-codex PROMPT='Explain this module'
```

### Direct CLI usage

```bash
codex exec "Explain the retry logic in this package"
```

## Smart Delegation

`codex` declares the `code_execution` strength and ranks behind gemini,
qwen, minimax, glm and muse in the candidate order. It declares no
model ids, so `smart_delegate` leaves model selection to the CLI.

## Codex-Specific Details

| Property | Value |
|----------|-------|
| Binary | `codex` |
| Package | `@openai/codex` |
| Headless form | `codex exec <prompt>` |
| Prompt delivery | positional, stdin also supported |
| Version probe | `codex --version` |
| Auth probe | `codex login status` |
| Structured output | `codex exec --json` |

Login caveat worth knowing before scripting this: an open issue
(openai/codex#9253) reports that `codex login` fails outright on
headless hosts, over SSH or in containers, unless a workspace
administrator has separately enabled device-code auth. That is a
single reporter's account with no maintainer confirmation, but it is
the failure mode to check first when `codex exec` will not run
unattended. Persisting an API key beforehand avoids it.

## Exit Criteria

- [ ] `codex` resolves on PATH and answers `codex --version`
- [ ] `codex login status` reports a logged-in state rather than "Not
      logged in"
- [ ] The built command is `codex exec <prompt>` with the prompt last
      and no prompt flag before it
- [ ] File context was inlined into the prompt
- [ ] Output saved to `delegations/codex/YYYYMMDD_HHMMSS.md`
- [ ] This skill ran because `delegation-core` selected `codex`

Versions

RepositoryScoreLicence
This page · athola/claude-night-market100MIT
zebbern/agent-collab100Apache-2.0

Database snapshot: 13.11.2026 · package version b23f36ebfc3f (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100gemini-delegation
    Delegates tasks to Gemini CLI implementing delegation-core for Google's models. Use when delegation-core selects Gemini or 1M+ token context is needed.
  • 100codex
    Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing
  • 95codex
    Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing
  • 100codex
    Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing
  • 100codex
    Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing
  • 90codex
    Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.