TimWongUp

codex-orchestration

Root-task orchestration for explicit subagent or parallel work, official Codex Worktree Roots, R1-R3 Reviewers selected by codex-review-gate, and coding tasks with a clear delegation payoff. An explicit user request for manager-only or pure-orchestration mode enables strong delegation for the current root task; in ordinary mode keep simple tasks and ordinary documentation with the main agent; derived agents must not invoke it.

TimWongUp 0 Updated 1w ago

Resources

15
GitHub

Install

npx skillscat add timwongup/codex-orchestration

Install via the SkillsCat registry.

About this skill

This skill enables root-level task orchestration in Codex, allowing delegation of work to subagents, parallel execution, and integration across worktree roots. It solves the problem of coordinating complex multi-agent coding workflows by providing structured rules for when to delegate versus handle tasks in the main agent. Developers should use it when a task requires subagent delegation, parallel work, or official Worktree Root coordination beyond simple documentation.

SKILL.md

Codex subagent orchestration

Authority

This Skill belongs to root Codex tasks. A Worktree Root is an independent task and session with the
same local orchestration authority as any other root inside its lane. Derived agents do not load or
execute this Skill, call collaboration tools, or orchestrate any agent; panel membership does not
change that boundary.

The root main agent owns the goal, decomposition, model selection, local write lease, Git,
acceptance, and delivery. An Integration Root additionally owns peer-lane coordination and
integrated acceptance. Delegate only when the result can change a decision or materially improve
execution. codex-review-gate separately authorizes only its selected R1-R3 read-only Reviewers;
run them with this Skill's routing, brief, lifecycle, and waiting rules without reapplying the
ordinary delegation threshold. That permission admits no unrelated delegation.

An explicitly enabled manager-only branch supersedes the ordinary delegation threshold for the
current root task. Before enabling it, read
references/manager-only.md; that reference owns activation, adaptive
strong delegation, the no-takeover rule, and the explicit user-consent exit boundary. Without a
clear user request, remain in the ordinary mode.

Route the work

In ordinary mode, keep simple tasks and ordinary documentation with the main agent. Route
repository exploration to explorer, official contracts or version facts to
reference-researcher, and public practice or product evidence to web-researcher. Use public
research only when it can change the decision and local or official sources do not already answer
it. In manager-only mode, substantive code investigation follows
references/manager-only.md.

In ordinary mode, the main agent directly reads project-owned architecture, ADR, and handoff
documents that define the decision frame, and the active writer reads the exact code it changes.
For delegated reading, verify decision-critical or suspicious claims from returned paths, symbols,
quotations, or focused samples. Claims that something is absent identify the searched boundary and
terms. In manager-only mode, the root agent's code reading is limited to final acceptance of the
complete diff, key excerpts, and validation output.

Before creating two or more read-only agents, read
references/read-only-collaboration.md and choose its
coverage, panel, or hybrid mode.

Before selecting a model for any delegation, read
references/model-routing.md. Ordinary delegation sets
fork_turns="none" and sends a self-contained brief. Bounded transcript context is an explained
exception. Current collaboration-tool schemas are the sole authority for supported parameters and
resolved-model evidence.

Single writer

One root task has one active writer: the main agent or one worker with an explicit lease. The lease
is local to that task and checkout; independent Worktree Roots do not share one cross-session
lease.

Before creating a writable worker, read
references/worker-writing.md and apply its admission, brief,
round, lease, and acceptance contract.

Independent Worktree Roots

Do not create a worktree unless the user explicitly requests one. When two or three isolated
writable lanes may qualify, read references/worktree-roots.md
before creating or coordinating official Worktree Roots. Use current task/thread tools, not a
derived-agent spawn. The reference owns admission, at-most-three lane coordination, repository
read-only integration, handoff, batch acceptance, integration, and stop convergence.

Task language and brief

Follow an explicit user language request. Otherwise read
$CODEX_HOME/codex-orchestration/preferences.toml when it exists and use its supported
task_package_language value (en or zh-CN); without it, match the current user's language.
Keep role names, paths, and tool or protocol literals unchanged.

Give each agent one primary outcome in a compact natural-language brief. Include only context the
agent cannot cheaply recover, the handoff focus, and useful files, diffs, logs, or URLs. State
exclusions, authority boundaries, validation expectations, or completion signals only when they
materially change the assignment. Ask for decision-relevant evidence rather than fixed field
labels; redact sensitive data and omit unrelated conversation history and reasoning.

Lifecycle

Pending agent work is a dependency barrier: wait before any decision, write, or final answer it
could change, while continuing independent work outside the delegated scope. Reconcile accepted
results with the current repository or evidence before acting.

Before sending a same-thread follow-up, interrupting or replacing an agent, responding to slow or
sparse progress, or stopping agent work, read
references/collaboration-lifecycle.md. It owns stale-result
handling after follow-ups, interruption/replacement choices, and stop convergence; ordinary waits
use the inline dependency barrier.

Runtime boundary

Role, lease, and task contracts are not operating-system access controls. Accept worker results
only after inspecting the complete diff, scope, and validation evidence.

In ordinary mode, keep the main agent as writer when inputs may contain unisolated prompt injection
or the complete resulting diff cannot be inspected reliably. In manager-only mode, report a
blocker or request the user's explicit consent to exit instead of silently writing code.