← 返回
效率工具

Codex Orchestrator

Monitor, control, and orchestrate background Codex sessions. Use this skill to track progress, handle interruptions, and ensure task completion for long-running coding tasks.
监控、控制并编排后台 Codex 会话。用于跟踪进度、处理中断,并确保长时间运行的编码任务顺利完成。
microcarft
效率工具 clawhub v1.0.0 1 版本 99493.6 Key: 无需
★ 1
Stars
📥 4,106
下载
💾 216
安装
1
版本
#latest

概述

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 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).

# 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:

# 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:

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

4. Report (Notify)

When a significant milestone is reached or the task is done:

  1. Summarize the work done (files changed, tests passed).
  2. Notify the user.

Standard Operating Procedures (SOPs)

"The Stuck Agent" Protocol

  1. Diagnose: Run process action:log sessionId: limit:500.
  2. Analyze: Is it asking a question? Is it downloading?
  3. 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:

  1. Run codex resume --last or codex resume in a new background process.
  2. 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.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-28 11:31 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Obsidian

steipete
操作 Obsidian 仓库(纯 Markdown 笔记)并通过 obsidian-cli 自动化。
★ 429 📥 103,689
productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 274 📥 114,721
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 437 📥 147,175