codex

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

1|Updated Jun 24, 2026
One-click install
npx skills add https://github.com/maopujie10-sys/Bailongma --skill codex-maopujie10-sys
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex
Source: https://github.com/maopujie10-sys/Bailongma/tree/main/skills/hermes-skills/autonomous-ai-agents/codex
Command: npx skills add https://github.com/maopujie10-sys/Bailongma --skill codex-maopujie10-sys

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @openai/codex.

What problem does it solve? It lets an AI agent offload coding work—building features, refactoring, reviewing PRs, and fixing issues in batches—to OpenAI's Codex CLI instead of writing every change itself. ## Core Features & Use Cases - One-shot execution: Run codex exec with a prompt for tasks that complete and exit cleanly. - Background long tasks: Launch Codex with background=true and monitor progress via process poll/log, sending input when Codex asks questions. - Parallel workflows: Use git worktrees to fix multiple issues or review multiple PRs concurrently, then push branches and open PRs with gh. - Use Case: Ask the agent to fix issues #78 and #99 in parallel; it creates two worktrees, runs Codex in each, commits the fixes, and opens pull requests. ## Quick Start Ask the agent to run codex exec with a prompt like "Add a dark mode toggle to settings" inside your git repository using a PTY terminal session.

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 one-shot coding tasks?

Use codex exec followed by your prompt in quotes, run inside a git repository with a PTY terminal. The command executes the task and exits when done, and adding --full-auto auto-approves file changes within the sandbox.

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

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

Why does Codex CLI fail with sandbox permission errors?

Codex workspace-write sandboxing can fail in service or gateway contexts with bubblewrap user-namespace 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 in parallel with Codex?

Fetch all PR refs with git fetch, then launch separate background codex exec sessions for each PR diff against the base branch. After reviews complete, post the results as comments using the gh pr comment command.