✓ Verified 💻 Development ✓ Enhanced Data

Codex Orchestrator

Monitor, control, and orchestrate background Codex sessions.

Rating
4.9 (187 reviews)
Downloads
5,626 downloads
Version
1.0.0

Overview

Monitor, control, and orchestrate background Codex sessions.

Complete Documentation

View Source →

Codex Orchestrator

This skill provides a workflow for supervising the Codex coding agent running in background processes.

Workflow

1. Start (Launch)

Always launch Codex in a background PTY session to maintain interactivity without blocking the main agent.

bash
bash pty:true workdir:<target_dir> background:true command:"codex exec --full-auto '<PROMPT>'"
  • Store the returned sessionId.
  • If sessionId is lost, find it via process action:list.

2. Monitor (Watch)

Check progress regularly (e.g., via cron or manual check).

bash
# Get last 2KB of logs to see current status
process action:log sessionId:<id> limit:2000

Signs of life:

  • Spinner animations or progress bars updating.
  • "Working...", "Thinking...", "Running...".
  • File edits (Edit ...).
Signs of blockage:
  • Interactive prompts (e.g., "Select directory", "Approve change [y/n]").
  • No log output for >5 minutes (process might be hung or waiting for hidden input).

3. Intervene (Control)

If Codex is stuck at a prompt:

bash
# Send 'y' and Enter
process action:submit sessionId:<id> data:"y"

# Send just Enter (default choice)
process action:submit sessionId:<id> data:""

If Codex is looping or hallucinating:

bash
# Kill the session
process action:kill sessionId:<id>

4. Report (Notify)

When a significant milestone is reached or the task is done:
  • Summarize the work done (files changed, tests passed).
  • Notify the user.

Standard Operating Procedures (SOPs)

"The Stuck Agent" Protocol

  • Diagnose: Run process action:log sessionId: limit:500.
  • Analyze: Is it asking a question? Is it downloading?
  • Action:
  • If asking: Provide answer via submit.
  • If downloading (slow): Wait.
  • If silent >10m: Send a "poke" (e.g. submit data:"\n" to refresh prompt) or kill/resume.

"The Resume" Protocol

If a session died or was killed:
  • Run codex resume --last or codex resume in a new background process.
  • Verify it picked up the context.

Logs & Artifacts

  • Codex logs are ephemeral in the PTY buffer.
  • For persistent logs, instruct Codex to write to a file: codex exec "task..." > codex.log 2>&1 (Note: buffering may delay output).
  • Better: Use process action:log to snapshot the buffer periodically.

Installation

Terminal bash

openclaw install codex-orchestrator
    
Copied!

💻Code Examples

bash pty:true workdir:<target_dir> background:true command:"codex exec --full-auto '<PROMPT>'"

bash-ptytrue-workdirtargetdir-backgroundtrue-commandcodex-exec---full-auto-prompt.txt
*   Store the returned `sessionId`.
*   If `sessionId` is lost, find it via `process action:list`.

### 2. Monitor (Watch)
Check progress regularly (e.g., via cron or manual check).

process action:log sessionId:<id> limit:2000

process-actionlog-sessionidid-limit2000.txt
**Signs of life:**
*   Spinner animations or progress bars updating.
*   "Working...", "Thinking...", "Running...".
*   File edits (`Edit ...`).

**Signs of blockage:**
*   Interactive prompts (e.g., "Select directory", "Approve change [y/n]").
*   No log output for >5 minutes (process might be hung or waiting for hidden input).

### 3. Intervene (Control)
If Codex is stuck at a prompt:
example.sh
# Send 'y' and Enter
process action:submit sessionId:<id> data:"y"

# Send just Enter (default choice)
process action:submit sessionId:<id> data:""

Tags

#coding_agents-and-ides #code

Quick Info

Category Development
Model Claude 3.5
Complexity One-Click
Author microcarft
Last Updated 3/10/2026
🚀
Optimized for
Claude 3.5
🧠

Ready to Install?

Get started with this skill in seconds

openclaw install codex-orchestrator