Moving code-writing from Claude workers to Codex
Moving code-writing from Claude workers to Codex takes that work off my Claude allowance, while Claude still plans the work and reviews what Codex returns.
- In two runs of two tasks each, implementation took about 72% of 369K Claude-side tokens in the Claude-only run, while the Claude steps that launched Codex took about 20% of 327K in the other.
- The Claude version of the skill now runs Codex on gpt-5.6-terra at medium effort and stops after a two-task pilot, while a separate native Codex version makes the pilot optional.
- A worker that wrote into the repository root and a review that missed six TypeScript errors are why the Claude version checks where edits landed and asks for the project's own checks.
This post covers what happened when I moved code-writing from Claude workers to Codex, after those workers kept draining my weekly Claude allowance ahead of schedule and stopping me in the middle of plans.
Dynamic Workflows is my Claude Code setup for letting one Claude session divide a plan among several worker agents, review their changes, and report back. That's the conductor pattern: one agent coordinates while the others do the work, which keeps most of the file reads and tool output out of the main conversation, but every worker still draws on the same Claude allowance, so the main conversation can look beautifully economical while the workers use up the week.
So I kept Claude planning and reviewing and moved implementation to Codex, OpenAI's coding agent, which draws on its own allowance. The Claude workflow calls it through codex exec, a command that runs a Codex task without an interactive conversation. That became the Claude skill dynamic-workflows-codex, which I call the bridge because Claude launches Codex and then reviews what comes back. Opus, a Claude model, splits the plan into waves (groups of tasks that can run at the same time); Codex implements each task in its own Git worktree, a separate checkout where its edits won't collide with another worker's files; and Sonnet, another Claude model, verifies the changes and writes the report.
Where the tokens went
The sister post on hitting your limit explains why long worker sessions get expensive. To see where the tokens went here, I compared the workflow logs from two runs of two tasks each in the same repository: one Claude-only, and one with Codex implementing on OpenAI's gpt-5.6-luna model at xhigh reasoning effort (how much thinking the model does before it answers), a setting I picked by feel without comparing models.
codex exec. Codex's code generation sits outside both totals. The runs implemented different features, so these counts show how each run split its tokens; they don't rank the two approaches, measure weekly quota consumed, or give the combined cost of both tools.What a Codex worker needs in its work order
A fresh Codex process doesn't inherit the Claude conversation. It can read the repository, but it needs a work order (the written assignment for one task) that explains the task without the discussion that produced it. The companion skill, dynamic-workflows-plan, adds that structure to ce-plan, my planning skill: each task gets a Dispatch header naming its model and effort, the files it owns, the files it needs to read, and a gate (the check it must pass), while prerequisites go in the plan's dependency graph.
fan-out structure → dynamic-workflows-codex
Claude runs Codex → your gate + PR
When task B needs code from task A, that code has to be in B's checkout before B starts, and listing A first doesn't put it there. The bridge gives a task with one prerequisite a branch that starts from that prerequisite's branch, so A's code is already present. A task with several prerequisites still starts from HEAD (the commit the repository has checked out), so its dependencies have to be brought together during integration.
The Claude version and the Codex version have the same name
The bridge lives under ~/.claude/, Claude Code's configuration directory. My installed copy has since moved from Luna to OpenAI's gpt-5.6-terra model at medium effort, raised to high for repairs. Before the full run, it does a two-task pilot and stops for my go-ahead.
The worker leaves its edits uncommitted. After review accepts a task, a separate workflow stage commits it to a branch, and the report doesn't merge anything.
- Decompose · Opusplan → dependency waves
- Codex writes · Terramedium effort; own worktree
- Verify · Sonnetchecks the result
- Report · Sonnetbranches, findings
- You mergenever auto-merged
The other version is a native Codex skill, also called dynamic-workflows-codex, installed under ~/.agents/skills/ (the folder where Codex looks for a user's skills). It uses Codex's own agents without the Claude bridge and follows my configured model routing instead of naming a model. A pilot is optional, and an authorized full run doesn't stop for pilot approval. By default it leaves changes uncommitted in an isolated worktree, and whether it commits or opens a pull request depends on the authority given for that run. Its primary agent integrates and checks a prerequisite before releasing the tasks that need it. The token comparison above belongs to the bridge.
Two failures behind the bridge's checks
The bridge's own incident notes record a worker whose edits leaked into the repository root, the shared main checkout, instead of staying in its assigned worktree. That is why the post-run check includes the root's git status (Git's list of uncommitted changes): check where the edits landed before paying for another attempt, and preserve any unrelated work when recovering them.
Another task passed review with six TypeScript errors, because the reviewer had looked only at the diff (the record of changed lines) and the project's typecheck (the compiler pass that catches TypeScript type errors) hadn't run.
Get the skills
The public skills repository contains both versions, with install scripts for Bash and PowerShell, and its README covers setup. You can also download the Claude bridge ZIP or the native Codex ZIP.
If your plans aren't yet split into tasks with owned files and a named check, start with dynamic-workflows-plan on its own, since the bridge expects a plan in that shape.