Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Turn the current Codex thread into a coordination thread that routes implementation work to durable reusable child threads in disposable worktrees with short-lived branches targeting main.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 245% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 167% | 0% |
| case-22 | ✗→✓ | ▲ Improved | 137% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 241% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 168% | 0% |
Use this skill when the user wants the current thread to act as a chief-of-staff thread: route work, keep context, supervise child threads, arbitrate conflicts, and avoid doing implementation locally.
$orchestrator on: activate orchestration-only mode for this thread.$orchestrator off: return this thread to normal local execution.$orchestrator status: report mode, active child threads, checkout slots,branches, ports, data strategies, blockers, and push state.
Routing is automatic while orchestrator mode is on. Do not invent a manual routing command.
Worktrees alone are not orchestrator mode.
The parent may create worktrees, copy ignored environment files, install dependencies, and serialize PR or merge work as setup. That is direct-worktree coordination until durable child threads are created or reused and implementation instructions are sent to them.
Before code-changing work starts under an orchestrator claim:
orchestrator mode: on in the active plan or status.conflict group.
A durable child thread id belongs to a visible Codex thread created or found through thread-management tools. A hidden sub-agent, worker id, nickname, or submission id is not a durable child thread id.
If the child thread is attached to the root project but assigned to a manual sibling worktree, every apply_patch target must be absolute under the assigned worktree. Bare relative patches may hit the root checkout. The parent prompt must state this, and the child must audit after its first edit that the root checkout was not modified. If work leaks into the root checkout, stop before review, push, or PR; recreate or move the work into the assigned worktree and remove only the accidental root changes.
If durable thread tools are unavailable, record orchestrator blocked: durable thread tools unavailable and stop unless the user explicitly allows a non-orchestrated fallback. Never execute locally and still call the run orchestrated.
Do not use hidden workers, temporary sub-agents, or non-sidebar delegation tools for orchestrator child execution, status, review, or PR closeout. If one was started by mistake, pause it, park its work, record the workflow miss, and move the lane to a durable Codex child thread before review, push, PR, or the next implementation lane.
When orchestrator mode is on:
forwarding, conflict arbitration, push serialization, merge coordination, and closeout.
guidance unless the repo explicitly assigns another parent-only surface.
review, push, or PR. Move or recreate it in a disposable worktree branch from main and keep the root as scheduler.
first, then assign a disposable worktree with a short-lived branch from main, even when work is serial.
merge conflicts are not enough to serialize; record a conflict group and resolve conflicts when they become real.
main after repo-required checks and relevant proofpass. Merge when repository policy and the hosting service allow it.
archive the finished child thread, and release its slot unless a recorded blocker still owns it.
thread before executing.
Implementation work is any task expected to create, modify, review, or continue product code, tests, migrations, issue-linked docs, a runtime plan, a branch, or a PR.
Examples:
continue, fix CI, push, commit, that slot, orthat checkout when they refer to code-changing work.
Not implementation work by default:
main.Choose the lightest honest mode:
parent-root: coordination, non-mutating triage, merge arbitration, andparent-owned planning or agent guidance. It is not an implementation or PR review checkout.
single-worktree: serial implementation when packets have a true hardconflict, such as the same migration, generated artifact, config contract, security policy, records, or unmergeable file lines.
same-checkout: non-mutating child coordination only. Never let two childthreads mutate the same checkout concurrently.
worktree: every implementation packet and PR branch. Each worktree has aunique short-lived branch based on main and a PR back to main.
Nearby components, the same product area, or a few expected merge conflicts are not hard conflicts.
main Policymain is the default integration branch and PR target.main.origin main when it exists, integrateorigin/main using the repo's required strategy, rerun required checks and proof, then push the short-lived branch.
main when checks pass and repository policy allows it.parent instead of widening scope.
race.
main to the root checkout. Do not leave adisposable scheduler worktree as the long-lived owner of main.
checkout. Park them on an explicit branch or report the blocker.
writes.
destructive cleanup, broad mutation tests, or overlapping record writes.
parent to serialize it or move it to isolated data.
or reused by a child without reassignment.
<repo>-1, <repo>-2,and <repo>-N unless repo instructions define another convention.
while active work, an unmerged branch or PR, a runtime, a review, or cleanup risk still owns it.
codex/<surface>-<YYYYMMDD-HHMMSS> unless the user or repo names another branch.
environment files according to repo instructions. Explicitly exclude .git and dependency directories. Never print secret values.
git rev-parse --show-toplevel in the target and verify it resolves to the assigned worktree before install, dispatch, or mutation.
recorded owner, expiry, and next proof.
active, blocked, or decision-owning threads visible with an owner and next poll.
durable child thread id means no implementation start.
tracker issue, existing thread title, or task name.
text<CHECKOUT-OR-WORKSTREAM> <short task title>
assigned worktree, main base and PR target, port, data strategy, runtime owner, conflict group, proof expectations, and push or tracker expectations.
report checkout, branch, PR, tests, runtime proof, blockers, conflict risk, and next owner.
and handoff closure, remove the worktree, archive the child thread, and release the slot.
md| Checkout / workstream | Child thread | Mode | Path | Branch | Port | Data | Conflict group | Status | Last update | Next | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
Use durable Codex thread tools only. Search for them by exact namespace-qualified name:
codex_app.list_projectscodex_app.create_threadcodex_app.list_threadscodex_app.read_threadcodex_app.send_message_to_threadcodex_app.set_thread_archivedCore routing needs project lookup, thread creation, thread listing, thread reading, and message sending. Finished-child cleanup needs thread archiving. If archiving is unavailable, record child archive blocked: tool unavailable and keep the slot unavailable until closeout evidence is copied and the parent explicitly accepts the stale visible thread.
Before creating a child, resolve the saved Codex project whose local path exactly matches the root checkout. Do not use a parent directory, sibling checkout, or nearest-prefix match. If the exact project is unavailable, report orchestrator blocked: exact saved project unavailable.
Preserve the configured model and reasoning effort unless the user or repo instructions explicitly require overrides. Record any override and its rationale in the parent plan and child prompt.
If durable thread tools are unavailable, stop. Do not substitute hidden sub-agents, parallel workers, or temporary agents; their ids do not satisfy the durable child-thread gate.
Send a compact prompt when creating or reusing a child:
mdYou are the child execution thread for `<checkout-or-workstream>`. Run: <exact user request or skill> Context from orchestrator: - Sources, decisions, blockers, branch and push state. - Workspace mode and absolute checkout path. - Branch based on `main`; PR target `main`. - Port, data strategy, runtime owner, and conflict group. - Acceptance criteria, non-goals, required proof, review, push, and tracker expectations. Rules: - Follow the repo's AGENTS instructions and implementation skill. - Use only the assigned checkout. - If the thread project differs from the assigned worktree, use absolute paths for every edit and audit the root checkout after the first mutation. - Verify required ignored environment files without printing values. When copying them, exclude `.git` and dependency directories, then prove `git rev-parse --show-toplevel` resolves to the assigned worktree. - Install dependencies with the repo's required command only when needed and authorized for this lane. - Respect the assigned runtime owner, port, and data strategy. - Keep review and PR work inside this child/worktree lane. - Report conflicts instead of widening scope. - Reuse this thread for future work on this checkout/workstream. - Before push, integrate current `origin/main`, rerun required proof, and never force push. - Report checkout, branch, PR URL/state, data strategy, push state, tests, runtime proof, blockers, and next owner.
On heartbeat or $orchestrator status:
conflict decisions.
active lanes or start the next independently runnable packet.
status when thread tools exist.
runtime ownership, and parent-owned merge plan.
that has a safe slot, data strategy, runtime owner, and durable child thread.
do it here, local, or $orchestrator off, turn mode offbefore executing locally.
disposable worktree before mutation.
main.main or reports the exact blocker.Other measured skills in the registry, with their headline benchmark lift.