@dnguyen0293
David NguyenDeveloper▲9
Developer, Software
3h ago · edited · AI Engineering, Models · Helsinki

From plan to patch with Claude Code and Codex

From plan to patch with Claude Code and Codex

I still move plans by hand between Claude Code and Codex in the same IDE. Claude Code helps me compare designs. I give Codex the approach I chose and the acceptance criteria so it starts with a clear brief.

I want a submitted Claude Code plan to start a Codex run automatically. plan.ready is the event my runner would emit once its checks pass.

Here’s the workflow I’d start with.

  1. After I choose the design, Claude Code submits the plan. It marks the versioned plan submitted and includes the file scope, acceptance criteria, tests, and base Git commit. My next approval happens at diff review, before merging.
  2. The local runner checks the handoff.
  3. Schema. Requires the plan fields and submitted status. Sends an invalid plan back to Claude Code.
  4. Staleness. Compares scoped paths at the base commit and the target branch tip. If any changed, it sends the plan back. Otherwise, Codex starts from the tip. I rely on tests to catch breakage from lockfile or imported API changes outside those paths.
  5. Duplicates. Uses the task ID and plan version together as the idempotency key. Requires a new plan version to retry after a failure or blocker.
  6. Codex implements in a separate Git worktree and returns the diff and test results. It escalates blockers to me.

I’d prototype with Claude Code’s structured CLI output and codex exec, using today’s manual handoff as the baseline for time to a reviewable patch and how often I step in.

Links Claude Code automation docs · Codex as a platform (OpenAI)
How do you handle stale plans between agents? I’m curious which changes outside the planned file scope have forced you to replan.

Comments

No comments yet
Start the conversation.
Log in to join the thread.