codex

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

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill codex-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex
Source: https://github.com/CHENHUI-X/toolbox/tree/main/official-skills/autonomous-ai-agents/codex
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill codex-chenhui-x

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @openai/codex.

What problem does it solve? Delegating feature builds, refactors, and PR reviews to an autonomous coding agent requires knowing the right CLI flags, sandbox modes, and terminal settings, and mistakes like missing a PTY or running outside a git repo cause silent failures. ## Core Features & Use Cases - One-Shot Task Execution: Run codex exec with sandboxed workspace-write mode to build features or fix bugs non-interactively. - Background Long-Running Tasks: Launch Codex in background sessions and monitor, feed input, or kill them via process controls. - Parallel Workflows: Use git worktrees to fix multiple issues or review multiple PRs concurrently, then push branches and open PRs with gh. - Use Case: Point it at two open issues, spin up two worktrees, let Codex fix both in parallel, then push the branches and create pull requests automatically. ## Quick Start Ask the agent to run Codex in one-shot mode inside your git repository, 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 Codex CLI for a one-shot coding task?

Use codex exec followed by your prompt inside a git repository, with pty=true in the terminal call. Codex runs the task and exits when done, for example codex exec 'Add dark mode toggle to settings'.

How do I run Codex 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, and stop it with kill if needed.

Why does Codex fail with sandbox permission errors?

In gateway or service contexts, workspace-write sandboxing can fail with bubblewrap user-namespace errors like 'setting up uid map: Permission denied'. Use --sandbox danger-full-access instead and rely on process boundaries, clean git state, and diff review for safety.

Can Codex run outside a git repository?

No, Codex refuses to run outside a git repository. For scratch work, create a temporary directory and run git init first, for example cd $(mktemp -d) && git init && codex exec 'your task'.

How do I fix multiple GitHub issues in parallel with Codex?

Create a git worktree per issue with git worktree add, then launch a background Codex process in each worktree with its own fix prompt. After completion, push each branch and open PRs with gh pr create, then remove the worktrees.