Skip to content
Day 69: new resources are added every day. See what's new

Free guide

OpenAI Codex + Claude Code Guide

Turn two leading coding agents into one reliable workflow

  • 20 bite-sized sections
  • 6 min read
  • Free, no signup

Short answer

A free guide to using OpenAI Codex and Claude Code together: how they compare, shared AGENTS.md instructions, the official Codex plugin for Claude Code, cross-reviews, parallel worktrees, skills, MCP, plans, safety and a master two-agent prompt.

Updated

Built with love by Shushant Lakhyani. Building bestproductivityresources.com

Inside this guide

Short cards you can read in order or jump straight to. Tap the link icon on any card to share just that part.

01

See why you should use both

OpenAI Codex and Anthropic’s Claude Code are both agentic coding tools. Each one can read a codebase, edit files, run commands, and review changes.

Running both gives you:

  • A second opinion on high-stakes changes
  • Independent reviews from separate model families
  • A fallback when one tool hits its usage limit
  • Access to each tool’s ecosystem strengths
  • Parallel progress on separate tasks

Two agents are not automatically twice as good. They pay off when each one has a clear role.

02

Get to know Codex

Made by
OpenAI
Surfaces
ChatGPT desktop app, CLI, IDE extension, Codex Cloud, GitHub, Slack, and mobile
Recommended models
GPT-6.1 Sol for complex work, GPT-6 Luna for focused tasks, and GPT-6 Astra for the toughest problems
Instructions file
AGENTS.md
Skills folder
.agents/skills
Plans
Included from ChatGPT Plus ($20/month); Free and Go users get GPT-6 Luna in the desktop app, depending on rollout
03

Get to know Claude Code

Made by
Anthropic
Surfaces
Terminal, VS Code, JetBrains, Claude desktop app, web, mobile, and Slack
Models
Claude Opus 5.5, Sonnet, Haiku, and more, with effort levels from low up to max
Instructions file
CLAUDE.md, and it can also read AGENTS.md
Skills folder
.claude/skills
Plans
Part of every paid Claude plan, starting with Pro at $20/month
05

Share one instructions file

Keep a single source of truth so both agents work from the same rules.

  • Put your project rules in AGENTS.md
  • Let Codex read AGENTS.md automatically
  • Let Claude Code read AGENTS.md when no CLAUDE.md exists (v2.1.277 or later)
  • Add @AGENTS.md to CLAUDE.md to import the shared file if you need both

One rulebook, two agents. Never keep two copies of the same rules.

06

Write rules both agents can obey

Cover these in AGENTS.md:

  • What the project does
  • Setup and install commands
  • Test, lint, and build commands
  • Code style and naming conventions
  • Folders and files to leave alone
  • Actions that require human approval
  • Commit message format
  • What counts as done

Keep it short and specific. By default, Codex caps combined AGENTS.md content at 32 KiB.

07

Run Codex inside Claude Code

OpenAI publishes an official open-source plugin that runs Codex from within Claude Code. It calls the Codex CLI already on your machine, using your current login and settings.

Install it from Claude Code:

/plugin marketplace add openai/codex-plugin-cc /plugin install codex@openai-codex /reload-plugins /codex:setup

You need a ChatGPT subscription (Free included) or an OpenAI API key, plus Node.js 18.18 or later.

08

Learn the plugin commands

/codex:review
Run a standard read-only review of your current changes
/codex:adversarial-review
Run a review that challenges design choices and assumptions
/codex:rescue
Hand Codex a bug investigation, fix, or follow-up task
/codex:transfer
Convert the current Claude Code session into a Codex thread
/codex:status
List running and recent Codex jobs
/codex:result
Display the output of a finished job
/codex:cancel
Stop a background job mid-run
09

Cross-review every important change

The simplest high-value pattern: one agent builds, the other reviews.

  • Claude Code makes the change
  • You run /codex:review or /codex:adversarial-review
  • Claude Code fixes the valid findings
  • You check the final diff and tests

Or flip it: Codex builds, and Claude Code reviews the diff.

Treat every review as evidence to verify, not a verdict to accept.

10

Plan with one, build with the other

For bigger features:

  • Have one agent draft a detailed plan
  • Ask the other to poke holes in it
  • Merge the best ideas yourself
  • Have one agent build from the final plan
  • Have the other review the result

Disagreement between the agents helps. It points you to the real decisions.

11

Work in parallel without conflicts

Never let two agents edit the same files at once.

  • Put each agent on its own Git branch
  • Use separate Git worktrees for parallel work
  • Assign tasks that do not overlap
  • Merge changes one at a time
  • Run tests after each merge

In Codex, /worktree runs a chat in a fresh Git worktree.

12

Play to each tool’s strengths

Codex Cloud
Run several tightly scoped tasks remotely, then review what comes back.
Codex GitHub review
Mention @codex review on a pull request or switch on automatic reviews.
Claude Code skills and hooks
Package workflows and enforce checks before or after each action.
Claude Code routines
Run scheduled jobs in the cloud, even while your computer is off.
Both
MCP connections, subagents, and terminal-based workflows.

Test both tools on your own codebase. Real tasks tell you more than benchmarks.

13

Share skills across both

Both tools define skills in a SKILL.md file with a name and a description.

  • Codex loads skills from .agents/skills
  • Claude Code loads skills from .claude/skills
  • Shared logic belongs in scripts both can run
  • Tool-specific notes stay short

Check each tool’s docs for format differences before you copy a skill across.

14

Connect shared tools with MCP

Both support the Model Context Protocol, so you can wire the same docs, issue tracker, or database into each one.

Codex
codex mcp add
Claude Code
claude mcp add

Give each agent only the servers its role requires.

15

Set safe permissions in both

Codex

Sandbox mode combined with an approval policy. The Auto preset means workspace-write with on-request approvals, with network access off by default.

Claude Code

Permission settings decide which tools and commands run without asking. Hooks can block risky actions before they happen.

Make both agents ask before they push, deploy, delete, or touch secrets.

16

Control cost and usage

  • Pick the cheapest model that does the job well
  • Raise effort only for genuinely hard problems
  • Save reviews for important changes, not every typo
  • Switch tools when one hits its limit
  • Keep instructions lean to save context

In Codex, /model changes both the model and reasoning effort. In Claude Code, use /model and /effort.

17

Keep humans in charge

Review these yourself:

  • Architecture decisions
  • Security-sensitive code
  • Database migrations
  • Payments and authentication
  • Anything that ships to production
  • Disagreements between the agents

Both companies warn that their agents can make mistakes. Two agents agreeing proves nothing.

18

Split the work clearly

Hand to the agents

  • Implementation
  • Tests
  • Refactors
  • Reviews and second opinions
  • Documentation
  • Repetitive fixes

Keep with the humans

  • Goals and priorities
  • Architecture
  • Final approvals
  • Security decisions
  • Releases
  • Customer impact
19

Follow the two-agent workflow

Rules
A single shared AGENTS.md.
Plan
One agent plans and the other critiques.
Build
One agent builds on its own branch.
Review
The other agent checks the diff.
Fix
Resolve the valid findings.
Test
Run the whole test suite.
Approve
A human reviews, then merges.
Learn
Add new lessons to AGENTS.md.
20

Use the master two-agent prompt

Hand this to the agent doing the build:

Read AGENTS.md and follow it exactly. Goal: [describe the change]. Constraints: [performance, security, or style requirements]. First, write a short plan and list the files you expect to touch. Wait for my approval. Then make the change on a new branch, add or update tests, and run the full test suite. When you finish, summarize what changed, why, and what a reviewer should check most closely. Do not push, deploy, or delete anything without asking me.

Then have the other agent review that summary and the diff, with a focus on correctness, security, and missing tests.

The real opportunity

Do not ask: “Which agent is better?” Ask: “How can each agent check the other so I ship better work?”

  • Rules
  • Plan
  • Build
  • Review
  • Fix
  • Test
  • Approve
  • Learn

Begin with one shared rulebook and one cross-review on your next important change, then grow the workflow from there.

Share this guide

The whole guide on one page

The same guide as one infographic. Save it, pin it or share it.

Frequently asked questions

The quick answers, if you just need the gist.

What does “OpenAI Codex + Claude Code Guide” cover?
It has 20 sections, starting with “See why you should use both”, “Get to know Codex”, “Get to know Claude Code” and “Install both tools”, plus 16 more sections.
How long does it take to read?
About 6 minutes. Every section is a short, self-contained card, so you can jump straight to the part you need.
Is this guide free?
Yes. The full guide is free to read on this page, with no sign-up.
When was this guide last updated?
It was last updated in October 2026.

Keep reading

More free guides you might like. Still no signup.

Free Notion database

1,100+ ways people are making money online

Real online businesses, creators and projects, broken down by how they make money: apps, online stores, AI tools and more. Free on Gumroad.

Get the free database

Free Notion database

399+ ways to make money online

Hundreds of online income methods in one place, so you can compare options and pick one to try. Free on Gumroad.

Get the free list

For research and ideas only. Results vary and nothing here is a promise of income. See our Disclaimer.

Weekly newsletter

Everything new, every Monday.

One short email every Monday with everything shipped that week: new free tools and websites, new guides, new free browser tools and what's new in my free Gumroad libraries, plus how the site is growing. Free, and you can unsubscribe anytime.

Join the newsletter

You sign up on Gumroad, which stores your email to send the newsletter. See our Privacy Policy.