Codex Dynamic Workflows
Canonical version: Codex Dynamic Workflows.
Codex Dynamic Workflows is a Codex CLI skill by DannyMac180 that turns large, ambiguous tasks into supervised AI-agent work. Instead of executing directly, the skill forces planning, delegation, and verification before anything risky happens.
What it does
The skill kicks in when a task benefits from explicit orchestration rather than one-shot execution. Triggers include parallel tracks (research, coding, QA, docs), high-risk operations (deploys, secrets, large repo changes), the need for a separate verification pass, or an explicit user ask for swarm / subagents / dynamic workflows. Small tasks are deliberately left alone.
How it works
A run goes through seven stages:
- Planning — restate goals, success criteria, and risks.
- Orchestration — create a workflow artifact describing the strategy.
- Delegation — split work into disjoint packets, each with clear ownership.
- Execution — run packets sequentially or spawn subagents for parallel work.
- Integration — synthesize results, resolve conflicts.
- Verification — checks scaled to task risk.
- Archival — save reusable recipes for the next similar job.
Key mechanics
- Workflow artifacts live in
.workflow/<slug>/and hold state, plans, and results. - Work packets are self-contained units with objective, context, owner, and success metric.
- Approval gates pause before destructive, external, or high-risk steps.
- Goal mode enables sustained multi-turn execution when the runner supports it.
- Subagent simulation falls back to sequential packet processing when no real runner is available.
Why it's interesting
It is one of the cleaner public examples of treating "agentic work" as a contract — explicit packets, owners, gates, and verification — rather than a vibe. The same shape maps onto how OSK already handles agent chains, panels, and councils, and it's a useful reference for designing reusable skill pipelines.
Related — Pi implementation
Michaelliv is exploring the same pattern inside Pi Mono with pi-dynamic-workflows. The Pi extension lets the model write a JavaScript workflow script that the workflow tool runs in a sandboxed Node VM, spawning isolated Pi subagent sessions via agent() calls — with parallel() and pipeline() for concurrent fan-out, JSON-Schema-validated structured output, live phase tracking, Esc-to-abort, and determinism safeguards (no Date.now(), Math.random(), require, or template interpolation). It is still prototype-stage — no persisted or resumable runs yet — but it is a clean Pi-side counterpart to the Codex skill.
References
About Sébastien
Ready to get to the next level?
Found this valuable? Share it with someone who needs it.