Claude Code + Codex Workflow: Split the Jobs, Land on Main¶
Many developers already pair Claude Code with Codex: one agent plans or builds, the other challenges the result. Ralph Workflow lets you keep that split and drop the manual glue between them.
Ralph Workflow lands coding-agent work directly on main, automatically, with no pull requests. It is a free and open-source CLI that runs the agent CLIs you already use, on your own machine. Each agent uses your own login or API key, so its usage is billed to you.
Why pair two agents¶
A second agent can catch things the first one missed. A common split is:
one agent plans and reviews;
the other writes the code.
The value is a second opinion. Keep in mind what it is not: a review by another agent is still an agent’s judgment. It is not an executed check, and it does not prove the code works.
What breaks when the glue is manual¶
Running two agents by hand usually fails in the handoffs, not in the code:
you copy plans, diffs and feedback between terminals;
each agent works from a different picture of the task;
shared files such as config, schema or interfaces drift between passes; and
nobody is sure which version of the work is current.
How Ralph Workflow splits the jobs¶
Ralph Workflow runs one loop against one spec in PROMPT.md: plan, build, commit, for a set number of developer cycles (2 by default). Each job in that loop is assigned to an agent chain in ~/.config/ralph-workflow.toml. A chain is an ordered fallback list: the first entry runs, and the rest are tried only if it fails.
The default config names only Claude. To bring Codex in:
Install the Codex CLI and sign it in.
Uncomment the
codexblock in~/.config/ralph-workflow-agents.toml.ralph --diagnosereports which agent CLIs it finds on yourPATH.Point a job at Codex in the
[agent_chains]section of~/.config/ralph-workflow.toml. For example, to have Codex write the code while Claude plans and reviews:[agent_chains] planning = ["claude/opus"] development = ["codex"] analysis = ["claude/opus"] commit = ["claude/haiku"]
Ralph Workflow starts each agent in its unattended mode, with permission prompts bypassed: Codex with --dangerously-bypass-approvals-and-sandbox, Claude Code with --dangerously-skip-permissions. Both can run commands and edit files on your machine without asking. Use a machine, container or VM you are willing to hand to the agents.
Where the work goes¶
After each commit, Ralph Workflow rebases it onto your local main and pushes main to origin/main. It is a plain push, never forced. No pull request is opened, and nobody merges by hand.
The review job (Claude, in the example above) runs after the push. It can loop back and fix things in new commits, but it does not stop a commit from landing.
Today the push runs without checks. The agents are asked to run the checks in PROMPT.md, but nothing enforces them. Your CI runs after the push, on main. The gate, which will run your suite and acceptance checks on the exact commit before every push, has not shipped yet. Until it does, we do not call any push verified.
Fastest honest way to try it¶
Pick one real task in a repository that already has tests, where a bad commit costs one
git revert.Write the spec in
PROMPT.md: what done means and how to check it. Delete the starter marker at the top.Run
ralph --diagnose. It checks that each agent CLI is on yourPATH; it does not check that you are signed in.Run
ralph.When the run ends, check what landed on
origin/mainagainst the spec. Run the checks yourself or watch CI onmain, andgit revertanything wrong.
Next reading¶
Getting Started — the shortest path to a real first run
Which Agent Should I Start With? — choosing the first agent
Ralph Workflow vs Codex CLI — when to drive Codex yourself instead
What an AI Coding Finish Summary Tells You — how to check what a run pushed