codex

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Delegating feature development, refactoring, and PR reviews to an autonomous coding agent requires knowing the right CLI flags, sandbox modes, and terminal settings, and mistakes like missing PTY or running outside a git repo cause silent failures. ## Core Features & Use Cases - One-Shot Task Execution: Run codex exec with prompts for features, refactors, and scratch prototypes, with --full-auto or --yolo autonomy levels. - Background & Parallel Workflows: Launch long-running Codex sessions in the background, monitor with process polling, and run parallel issue fixes using git worktrees. - PR Review Automation: Clone repos to temp directories, check out pull requests, and run codex review or batch diff-based reviews across multiple PRs. - Use Case: Assign two open GitHub issues to separate git worktrees, run Codex in --yolo mode on each in the background, then push branches and open PRs with gh once both finish. ## Quick Start Ask the agent to run Codex on your repository, for example: use Codex to add a dark mode toggle to the settings page in my project.

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?

Use `codex exec "your prompt"` inside a git repository with a PTY-enabled terminal. It executes the task and exits when done; add `--full-auto` to auto-approve file changes within the sandbox.

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

Launch `codex exec --full-auto "task"` with background=true and pty=true, which returns a session ID. Monitor progress with process poll and log actions, submit input if Codex asks questions, and kill the session if needed.

Why does Codex CLI fail with sandbox permission errors?

When invoked from a gateway or service context, bubblewrap user-namespace setup can fail with errors like "setting up uid map: Permission denied". Use `codex exec --sandbox danger-full-access` and rely on process boundaries, clean git state, and diff review for safety.

Does Codex CLI work outside a git repository?

No, Codex refuses to run outside a git repository. For scratch work, create a temporary directory with `mktemp -d`, run `git init` inside it, and then execute your Codex command there.

How do I review multiple pull requests with Codex in parallel?

Fetch all PR refs with `git fetch origin '+refs/pull/*/head:refs/remotes/origin/pr/*'`, then launch separate background Codex sessions running `git diff origin/main...origin/pr/N` reviews. Post results back with `gh pr comment`.