Codex Agent for Openclaw

Codex Agent serves as a sophisticated project manager for the OpenAI Codex CLI, automating task execution, monitoring, and knowledge base maintenance.

henryxiaoyang
v1.0.0
Feb 28, 2026
0
1.3k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install codex-agent

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install codex-agent using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Codex Agent?

Codex Agent is a specialized project management system designed to sit atop the OpenAI Codex CLI within the Openclaw Skills ecosystem. Rather than acting as a simple command relay, it functions as an autonomous project manager that understands requirements, designs execution strategies, and supervises the quality of AI-generated code. It utilizes a terminal-based interface combined with asynchronous monitoring to handle complex, multi-turn development tasks without requiring constant developer oversight.

The skill provides a robust framework for managing AI coding workflows by integrating tmux for persistent sessions and custom Python hooks for real-time notifications. By bridging the gap between high-level project goals and low-level CLI execution, Codex Agent ensures that Openclaw Skills users can maintain high standards of code quality and architectural integrity through automated reasoning and supervised iteration.

Codex Agent Use Cases

  • Managing complex multi-file code generation tasks through the OpenAI Codex CLI.
  • Automated monitoring of long-running coding processes with asynchronous wake-up notifications.
  • Synchronizing local knowledge bases with the latest AI model features and documentation.
  • Supervising AI-driven configuration changes and feature flag updates in development environments.
  • Orchestrating parallel development tasks using git worktrees and isolated tmux sessions.

How Codex Agent Works

  1. Requirement Analysis: The agent identifies task goals, technical stacks, and acceptance criteria through developer interaction.
  2. Strategy Planning: It consults an internal knowledge base to select the optimal model, reasoning effort, and execution mode (exec vs. TUI).
  3. Prompt Engineering: Using predefined patterns, it constructs precise instructions for the underlying AI model.
  4. Autonomous Execution: The agent launches the task, either in the background or via an interactive tmux pane, applying auto-approval or manual approval gates as configured.
  5. Real-time Monitoring: A pane monitor script tracks terminal output for specific triggers or approval requests.
  6. Verification and Reporting: Upon completion, the agent validates the changes against the initial requirements and provides a detailed summary of modifications.

Codex Agent Setup

To integrate Codex Agent into your Openclaw Skills workflow, follow these steps:

  1. Install tmux on your local machine and ensure the codex CLI is accessible via your path.
  2. Configure your codex settings by adding the notification hook to ~/.codex/config.toml:
notify = ["python3", "<path_to_skill>/hooks/on_complete.py"]
  1. Set the required environment variables for the notification system:
export CODEX_AGENT_CHAT_ID="your_unique_id"
export CODEX_AGENT_NAME="main"
  1. Verify the setup by running a test message through the agent:
openclaw agent --agent main --message "test"

Codex Agent Data Schema & Taxonomy

Codex Agent organizes its operational context through a structured set of Markdown files to ensure accuracy within Openclaw Skills:

Data Component Path Purpose
Feature Tracking knowledge/features.md Catalog of all CLI commands and feature flags.
Config Schema knowledge/config_schema.md Strict definitions for config.toml fields to prevent errors.
Prompt Patterns knowledge/prompting_patterns.md Library of optimized templates for specific coding tasks.
Version State state/version.txt Tracks local CLI version to trigger automated knowledge updates.
Execution Logs /tmp/codex_exec_output.txt Temporary storage for background process outputs.

Codex Agent Advanced Features

  • Dual-Channel Notification System: Combines Python-based turn hooks with shell-based pane monitoring for 100% visibility.
  • Intelligent Approval Modes: Toggle between Full-Auto for trusted tasks and Manual Approval for sensitive architectural changes.
  • Multi-Agent Orchestration: Support for launching and monitoring parallel agents across different git worktrees.
  • Automated TUI Interaction: Logic-driven keystroke injection into tmux panes for non-blocking interactive sessions.
  • Knowledge Staleness Checks: Automated workflows to refresh documentation and schemas if they haven't been updated in over 7 days.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*