codex

Delegates coding tasks to the OpenAI Codex CLI via terminal commands.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/xu1713/openhorse --skill codex-xu1713
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex
Source: https://github.com/xu1713/openhorse/tree/main/openhorse/openhorse/skills/autonomous-ai-agents/codex
Command: npx skills add https://github.com/xu1713/openhorse --skill codex-xu1713

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @openai/codex.

What problem does it solve? Offloading feature development, refactoring, and PR reviews to an autonomous coding agent requires careful terminal orchestration, and Codex CLI fails without a PTY, a git repository, or proper authentication. This Skill provides the exact command patterns and rules to run Codex reliably from the Hermes terminal. ## Core Features & Use Cases - One-Shot Execution: Run codex exec for single tasks like adding features or building scratch projects in temporary git repos. - Background Long Tasks: Launch Codex with --full-auto in background mode and monitor progress with process poll, log, and submit actions. - Parallel Workflows: Use git worktrees to fix multiple issues concurrently and batch-review PRs with codex review. - Use Case: Assign two open GitHub issues to separate worktrees, run Codex with --yolo in each, then push branches and open PRs automatically. ## Quick Start Ask the agent to run codex exec with a task description inside your project directory using pty mode, for example to add a dark mode toggle to the settings page.

Frequently Asked Questions about codex

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

FAQPage Schema
How do I run OpenAI Codex CLI for a one-shot coding task?

Run codex exec with your prompt inside a git repository, for example codex exec 'Add dark mode toggle to settings'. Always use pty=true in the terminal call because Codex is an interactive terminal app that hangs without a PTY.

How to run Codex CLI in the background for long tasks?

Launch codex exec with --full-auto and background=true, which returns a session_id. Monitor progress with process poll and log actions, send input with submit if Codex asks a question, and kill the session if needed.

Why does Codex CLI fail or hang when I run it?

Codex refuses to run outside a git repository and hangs without a PTY. Initialize a scratch repo with mktemp -d and git init for non-project work, and always set pty=true in terminal calls.

What is the difference between codex --full-auto and --yolo?

The --full-auto flag runs sandboxed but auto-approves file changes within the workspace. The --yolo flag removes both the sandbox and approvals entirely, making it the fastest but most dangerous option.

Can I fix multiple GitHub issues in parallel with Codex?

Yes, create a git worktree per issue with git worktree add, then launch a separate Codex process in each worktree with background=true. After completion, push each branch, create PRs with gh pr create, and remove the worktrees.

What authentication does the Codex CLI require?

Codex accepts either an OPENAI_API_KEY environment variable or OAuth credentials from the Codex CLI login flow stored under ~/.codex/auth.json. A missing OPENAI_API_KEY alone does not mean authentication is absent.