Skill v1.0.0
currentAutomated scan100/100name: orchestrate-thread-teams description: "Orchestrate complex, long-running work through persistent Codex task threads in a three-tier hierarchy: a primary adviser on gpt-5.6-sol with ultra reasoning, domain advisers on gpt-5.6-sol with high reasoning, and implementation workers on gpt-5.6-terra. Use when the user asks to parallelize work through visible tasks/threads, coordinate advisers and workers, dispatch follow-ups, wait for thread results, or resume a large workflow after restart. Keep subagents temporary and leaf-only; never allow a subagent to delegate or spawn another agent or thread." metadata: version: "1.0.0"
Orchestrate Thread Teams
Use persistent Codex tasks/threads for the real hierarchy. Do not substitute subagents for advisers or workers.
Read role-prompts.md before creating the first adviser or worker.
Use the fixed hierarchy
- Treat the current thread as the Primary Adviser.
- Target model:
gpt-5.6-sol. - Target reasoning:
ultra. - Own the overall goal, task graph, thread registry, conflicts, and final synthesis.
- Create persistent Adviser threads for independent domains.
- Model:
gpt-5.6-sol. - Reasoning:
high. - Inject the Adviser role prompt plus the domain assignment into
create_thread.prompt.
- Let each Adviser create persistent Worker threads for bounded tasks.
- Model:
gpt-5.6-terra. - Reasoning:
mediumby default; usehighonly for unusually difficult implementation. - Inject the Worker role prompt plus the exact task contract into
create_thread.prompt. - A Worker may use temporary subagents for independent leaf subtasks, while retaining ownership and review responsibility.
create_thread does not select a custom agent by name. Specify both the model/reasoning fields and the role prompt when creating the task.
If an Adviser lacks create_thread, require it to return structured worker work orders. The Primary Adviser then creates the Worker threads without changing ownership.
Create persistent threads
Before creating tasks, identify the correct saved project. Preserve the user's chosen environment. Keep related tasks in the same project; use isolated worktrees or a shared checkout according to the user's workflow and conflict policy.
Create an Adviser with this shape:
title: Adviser — <domain>model: gpt-5.6-solthinking: highprompt: <ADVISER_ROLE_PROMPT> + <domain goal, constraints, and ownership>
Create a Worker with this shape:
title: Worker — <bounded outcome>model: gpt-5.6-terrathinking: mediumprompt: <WORKER_ROLE_PROMPT> + <exact task contract>
Treat thread creation as asynchronous. Save returned thread IDs. If creation returns only a pending client ID, wait until a real thread ID exists before sending messages or waiting on it.
Coordinate through messages and waits
- Send follow-up messages to refine scope, add constraints, correct drift, or assign the next task to an idle persistent thread.
- Prefer reusing an Adviser or Worker whose role and ownership still match.
- Batch waits across active threads. Use returned cursors to suppress already delivered results.
- Let Advisers wait on and steer their own Workers. Let the Primary Adviser wait mainly on Advisers.
- Read full thread history only when a result is incomplete, contradictory, or needs evidence review.
- Keep the primary context focused on goals, decisions, ownership, blockers, and accepted results.
Enforce ownership
- Give every persistent thread an explicit scope and owner.
- Do not assign overlapping writes concurrently.
- Reserve shared resources for one owner or a dedicated integration thread.
- Require Workers to stop writing after reporting
READY/FROZEN. - Reject work that expands scope, hides a blocker, or conflicts with another owner.
- Verify important results against the actual artifact or current state; do not accept self-reported completion alone.
Restrict subagents
The Primary Adviser, an Adviser, or a Worker may create a subagent for a temporary, independent leaf task such as a narrow read-only search, short comparison, or isolated evidence check. The persistent thread that creates it retains ownership and must review its result.
Every temporary subagent prompt must include:
You are a terminal leaf. Do not delegate, spawn, create, or message another agent or thread. Complete only this temporary task and return the result to your parent.
Never use a subagent as an Adviser, persistent Worker, task owner, integrator, or long-running monitor. Never allow a subagent to spawn another subagent, agent, or thread. This restriction applies to the subagent, not to its persistent Worker parent.
Track compact states
Use only these states:
ACTIVE: working.READY/FROZEN: complete, evidence supplied, no further writes.BLOCKED/FROZEN: stopped with an exact missing condition.REJECTED: failed review and needs specific rework.COMMITTEDorINTEGRATED: accepted into the shared result.
Require concise handoffs:
STATUS:RESULT:EVIDENCE:CHANGES OR OUTPUTS:BLOCKERS:NEXT:
Run the orchestration loop
- Decompose the goal into independent adviser domains.
- Create or reuse Adviser threads.
- Have Advisers decompose domains into bounded Worker tasks.
- Fill available concurrency with non-conflicting Workers.
- Wait for changed thread states rather than polling continuously.
- Review READY results and send exact rework messages when needed.
- Turn blockers into explicit prerequisite tasks.
- Refill idle capacity until no safe relevant work remains.
- Integrate results in dependency order.
- Finish only when the overall outcome, validation, and cleanup are complete.
Do not ask the user to manage routine thread traffic. Surface only meaningful progress, decisions, permissions, and true blockers.