codex-orchestrationGeneral-purpose orchestration for Codex. Uses update_plan plus background PTY terminals to run parallel codex exec workers.
Install via ClawdBot CLI:
clawdbot install shanelindsay/codex-orchestrationYou are the orchestrator: decide the work, delegate clearly, deliver a clean result.
Workers do the legwork; you own judgement.
This guide is steering, not bureaucracy. Use common sense. If something is simple, just do it.
exec_command and write_stdin.A worker prompt begins with CONTEXT: WORKER.
update_planUse update_plan when any of these apply:
Keep it light:
in_progress.codex exec sessionsA sub-agent is a background terminal running codex exec with a focused worker prompt.
Use parallel workers for:
Avoid parallel workers that edit the same artefact. Default rule: many readers, one writer.
Use PTY sessions to run work without blocking the main thread.
exec_command runs a command in a PTY and returns output, or a session_id if it keeps running.session_id, use write_stdin to poll output or interact with the same process.Practical habits:
yield_time_ms so you do not stall.max_output_tokens modest, then poll again.session_id, and move on.Blocking vs non-blocking (recommend non-blocking even if you plan to poll):
Stopping jobs:
write_stdin.Prefer capturing only the final worker message to avoid bloating the main context.
Recommended (simple):
--output-last-message to write the final response to a file, then read it.codex exec --skip-git-repo-check --output-last-message /tmp/w1.txt "CONTEXT: WORKER ..."--skip-git-repo-check.Alternative (structured):
--json and filter for the final agent message.codex exec --json "CONTEXT: WORKER ..." | jq -r 'select(.type=="item.completed" and .item.type=="agent_message") | .item.text'Pick a pattern, then run it. Do not over-engineer.
Use when: you want multiple perspectives on the same thing.
Run 2 to 4 reviewers with different lenses, then merge.
Example lenses (choose what fits):
Deliverable: a single ranked list with duplicates removed and clear recommendations.
Use when: you want a clean funnel.
1) Reviewer produces an issue list ranked by impact.
2) Implementer addresses the top items.
3) Verifier checks the result.
This works for code, documents, and analyses.
Use when: lack of context is the biggest risk.
1) Scout gathers the minimum context.
2) Orchestrator condenses it and chooses the approach.
3) Implementer executes.
4) Verifier sanity-checks.
Use when: work divides cleanly (sections, modules, datasets, figures).
Each worker owns a distinct slice; merge for consistency.
Use when: the task is primarily web search and judgement.
Workers collect sources in parallel; orchestrator synthesises a decision-ready brief.
Use when: you are choosing direction (outline, methods plan, analysis, UI).
Workers propose options; orchestrator selects and refines one.
Most failures come from missing context, not missing formatting instructions.
Use a Context Pack when:
Skip it when:
Academic writing note:
Prepend the Worker preamble to every worker prompt.
CONTEXT: WORKER
ROLE: You are a sub-agent run by the ORCHESTRATOR. Do only the assigned task.
RULES: No extra scope, no other workers.
Your final output will be provided back to the ORCHESTRATOR.
Minimal worker command (example):
codex exec --skip-git-repo-check --output-last-message /tmp/w1.txt "CONTEXT: WORKER
ROLE: You are a sub-agent run by the ORCHESTRATOR. Do only the assigned task.
RULES: No extra scope, no other workers.
Your final output will be provided back to the ORCHESTRATOR.
TASK: <what to do>
SCOPE: read-only"
CONTEXT: WORKER
TASK: Review
SCOPE: read-only
LENS:
DO:
OUTPUT:
DO NOT:
CONTEXT: WORKER
TASK: Find and summarise reliable information on
SCOPE: read-only
DO:
OUTPUT:
DO NOT:
CONTEXT: WORKER
TASK: Produce
SCOPE: may edit
DO:
OUTPUT:
DO NOT:
CONTEXT: WORKER
TASK: Verify the deliverable meets the Goal and Success check.
SCOPE: read-only (unless explicitly allowed)
DO:
OUTPUT:
Boss rule:
You do not forward raw worker output unless it is already clean. You curate it.
Generated Mar 1, 2026
A development team uses the skill to run parallel code reviews across multiple modules. Workers assess different aspects like security, performance, and style, while the orchestrator merges findings into a prioritized fix list, speeding up release cycles.
A marketing agency deploys workers to scout competitor data and gather web sources in parallel. The orchestrator synthesizes insights into a decision-ready report, enabling rapid strategy adjustments for client campaigns.
Researchers use the skill to split writing tasks by sections (e.g., introduction, methodology, results). Workers draft in parallel, and the orchestrator ensures consistency and coherence, reducing time to publication.
An IT team runs background checks on system logs, security patches, and performance metrics using parallel workers. The orchestrator consolidates issues into a ranked action plan for maintenance and compliance.
A media company generates multiple article outlines or video scripts in parallel via workers proposing alternatives. The orchestrator selects the best option and refines it, streamlining creative production workflows.
Offer the skill as a cloud-based service with tiered pricing based on usage (e.g., number of parallel workers or execution time). Target businesses needing scalable AI orchestration for repetitive tasks like code reviews or data analysis.
Provide custom implementation services to integrate the skill into client workflows, such as setting up PTY sessions for specific industries. Charge per project or hourly for setup, training, and ongoing support.
Offer a free version with basic orchestration features (e.g., limited workers) to attract individual developers or small teams. Monetize through premium upgrades like advanced parallelism, priority support, or enterprise security features.
💬 Integration Tip
Start by testing with non-blocking PTY sessions for simple tasks like web research to avoid context bloat, then scale to parallel workers for complex reviews.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Provides a 7-step debugging protocol plus language-specific commands to systematically identify, verify, and fix software bugs across multiple environments.
A comprehensive skill for using the Cursor CLI agent for various software engineering tasks (updated for 2026 features, includes tmux automation guide).
Write, run, and manage unit, integration, and E2E tests across TypeScript, Python, and Swift using recommended frameworks.
Control and operate Opencode via slash commands. Use this skill to manage sessions, select models, switch agents (plan/build), and coordinate coding through Opencode.
Coding style memory that adapts to your preferences, conventions, and patterns for consistent coding.