codex-autopilot
tmux + launchd multi-project Codex CLI automation system. Watchdog-driven loop that monitors multiple Codex sessions in tmux, auto-nudges idle sessions, handles permissions, manages context compaction, runs incremental code reviews, and dispatches tasks from a queue. Use when managing multiple concurrent Codex CLI coding sessions, automating development workflows, or orchestrating parallel AI-assisted coding across projects. Triggers: autopilot, watchdog, codex automation, tmux codex, multi-project codex, auto-nudge codex, codex session management.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/imwyvern/codex-autopilotCodex Autopilot
Automated multi-project Codex CLI orchestration via tmux + launchd on macOS.
Overview
Codex Autopilot runs a watchdog loop that monitors multiple Codex CLI sessions in tmux windows. It detects idle sessions, auto-nudges them to continue, handles permission prompts, rotates logs, dispatches tasks from a queue, and sends notifications via Discord/Telegram.
Installation
git clone https://github.com/imwyvern/AIWorkFlowSkill.git ~/.autopilot
cd ~/.autopilot
cp config.yaml.example config.yaml
# Edit config.yaml with your project paths, Telegram bot token, and Discord channels
Dependencies
- macOS with launchd (for scheduled execution)
- tmux — session multiplexer for Codex windows
- Codex CLI (
codex) — OpenAI's coding agent - python3 — for state cleanup and PRD verification scripts
- yq — YAML processor for config parsing
- jq — JSON processor for state management
- bash 4+ — for associative arrays in scripts
Install dependencies via Homebrew:
brew install tmux yq jq
launchd Setup
Use install.sh to register the launchd plist:
./install.sh
This creates a LaunchAgent that runs the watchdog on a configurable interval.
Core Components
watchdog.sh
Main loop engine. On each tick:
- Iterates through configured project tmux windows
- Captures current Codex output via
codex-status.sh - Determines if session is active, idle, or stuck
- Dispatches appropriate action (nudge, permission grant, task from queue)
- Enforces cooldowns, daily send limits, and loop detection
codex-status.sh
Captures and analyzes tmux pane content. Detects:
- Codex activity state (working / idle / waiting for permission)
- Permission prompts requiring approval
- Context compaction signals
- Error states and crashes
tmux-send.sh
Sends keystrokes or text to a specific tmux window. Handles:
- Typing text into Codex prompt
- Pressing Enter/keys for permission approval
- Verification polling to confirm send succeeded
autopilot-lib.sh
Shared function library used by all scripts:
- Telegram notification helpers
- File locking primitives
- Timeout and retry logic
- Logging utilities
- State file read/write
autopilot-constants.sh
Defines status constants used across scripts (e.g., STATUS_ACTIVE, STATUS_IDLE, STATUS_PERMISSION).
task-queue.sh
Task queue manager. Supports:
- Enqueuing tasks for specific projects
- Dequeueing next task based on priority
- Task status tracking (pending/running/done/failed)
discord-notify.sh
Sends formatted notifications to Discord channels via webhook. Supports project-channel routing defined in config.yaml.
Other Scripts
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-imwyvern-codex-autopilot": {
"enabled": true,
"auto_update": true
}
}
}