codex-cli-reference

Document the workflow for invoking Codex via Claude's wrapper scripts.

1|Updated Jul 31, 2025
One-click install
npx skills add https://github.com/hughescr/claude-code-config --skill codex-cli-reference
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex-cli-reference
Source: https://github.com/hughescr/claude-code-config/tree/main/skills/codex-cli-reference
Command: npx skills add https://github.com/hughescr/claude-code-config --skill codex-cli-reference

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides reference documentation for invoking OpenAI Codex through Claude's wrapper scripts, helping developers understand how to start Codex, pass queries, monitor progress, and retrieve results.

Core Features & Use Cases

  • Wrapper Script Overview: Describes codex-start.sh, codex-wait.sh, and codex-get-session-id.sh and how they coordinate to run Codex tasks.
  • Query & Output Handling: Guides how to create a temporary query file, feed it to Codex, and read the JSONL output.
  • Session Management Scenarios: Explains starting new sessions and resuming existing ones using session IDs.

Quick Start

Use the codex-start.sh wrapper to begin a Codex session with a prepared query file, then poll with codex-wait.sh until completion, and finally read the JSONL output from the rundir.

Frequently Asked Questions about codex-cli-reference

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I start an OpenAI Codex session and retrieve results using CLI wrapper scripts?

Codex CLI wrapper scripts coordinate Codex sessions by using codex-start.sh to launch a prepared query, codex-wait.sh to poll until completion, and codex-get-session-id.sh to retrieve the session identifier for tracking and output reading.

How does session management work when automating Codex CLI tasks?

Session management uses codex-get-session-id.sh to obtain a unique identifier, allowing you to start new Codex sessions or resume existing ones. This ID tracks the task progress and locates the resulting JSONL output in the rundir.

What is the required workflow for passing queries to Codex through wrapper scripts?

The Codex wrapper workflow requires creating a temporary query file, feeding it to codex-start.sh to initialize the session, and monitoring the rundir for JSONL output. This ensures reliable query handling and output retrieval for Codex interactions.

Can I resume an existing Codex session instead of starting a new one?

Yes, you can resume an existing Codex session by referencing its session ID obtained through codex-get-session-id.sh. This supports continuing query handling and retrieving JSONL output from a previously started session without launching a new one.

How do I read and parse the output generated from a Codex CLI session?

You read Codex CLI output by accessing the JSONL files generated in the rundir after codex-wait.sh signals completion. These JSONL files contain the structured responses and code generated during the Codex session for parsing.