Skip to content
Day 40 since launch: Best Productivity Resources went live on 25 August 2026. Day 40 is live with yesterday's additions in the latest roundup!

Free guide

OpenAI Codex + Claude Code Guide

Turn two leading coding agents into one reliable workflow

Built with love by Shushant Lakhyani. Building bestproductivityresources.com

Screenshot or bookmark this page so you find it later, then share it with your network.

The guide

Every section is a compact, self-contained card.

01

Why use both

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

Using both gives you:

  • A second opinion on important changes
  • Independent reviews from different model families
  • A backup when one tool hits a usage limit
  • The strengths of each tool’s ecosystem
  • Parallel work on separate tasks

Two agents are not twice as good by default. They are better when each has a clear role.

02

Codex at a glance

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

Claude Code at a glance

Made by
Anthropic
Surfaces
Terminal, VS Code, JetBrains, Claude desktop app, web, mobile, Slack
Models
Claude Opus 5.5, Sonnet, Haiku, and others, with effort levels from low to max
Instructions file
CLAUDE.md, and it can read AGENTS.md
Skills folder
.claude/skills
Plans
Included in all paid Claude plans, from Pro at $20/month
04

01 · Install both

Codex CLI (macOS or Linux)

curl -fsSL https://chatgpt.com/codex/install.sh | sh

Claude Code (macOS, Linux, or WSL)

curl -fsSL https://claude.ai/install.sh | bash

Windows installers, Homebrew, and npm options are available for both. Run codex and claude in your project folder to sign in.

05

02 · Share one instructions file

Keep one source of truth so both agents follow the same rules.

  • Write your project rules in AGENTS.md
  • Codex reads AGENTS.md automatically
  • Claude Code reads AGENTS.md when there is no CLAUDE.md (v2.1.277 or later)
  • If you also need CLAUDE.md, import the shared file by adding @AGENTS.md to it

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

06

03 · Write rules both agents can follow

Include in AGENTS.md:

  • What the project does
  • Setup and install commands
  • Test, lint, and build commands
  • Code style and naming rules
  • Folders and files to avoid
  • Actions that need human approval
  • How to write commit messages
  • What done looks like

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

07

04 · Use Codex inside Claude Code

OpenAI publishes an official open-source plugin that runs Codex from inside Claude Code. It uses the Codex CLI already on your machine, with your existing login and settings.

Install it in Claude Code:

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

It requires a ChatGPT subscription (including Free) or an OpenAI API key, and Node.js 18.18 or later.

08

05 · Learn the plugin commands

/codex:review
A standard read-only review of your current changes
/codex:adversarial-review
A review that challenges design decisions and assumptions
/codex:rescue
Hand a bug investigation, fix, or follow-up task to Codex
/codex:transfer
Turn the current Claude Code session into a Codex thread
/codex:status
See running and recent Codex jobs
/codex:result
Show the output of a finished job
/codex:cancel
Stop a running background job
09

06 · Cross-review every important change

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

  • Claude Code implements the change
  • Run /codex:review or /codex:adversarial-review
  • Claude Code addresses valid findings
  • You review the final diff and tests

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

Treat each review as evidence to check, not a verdict to accept.

10

07 · Plan with one, build with the other

For larger features:

  • Ask one agent for a detailed plan
  • Ask the other to critique the plan
  • Merge the strongest ideas yourself
  • Let one agent build from the final plan
  • Let the other review the result

Disagreement between agents is useful. It shows you where the real decisions are.

11

08 · Work in parallel without conflicts

Never let two agents edit the same files at the same time.

  • Give each agent a separate Git branch
  • Use separate Git worktrees for parallel tasks
  • Assign clearly separate tasks
  • Merge one change at a time
  • Run tests after every merge

Codex has /worktree to run a chat in a new Git worktree.

12

09 · Use each tool’s strengths

Codex Cloud
Run several well-scoped tasks remotely, then review the results.
Codex GitHub review
Mention @codex review on pull requests or turn on automatic reviews.
Claude Code skills and hooks
Package workflows and enforce checks before or after actions.
Claude Code routines
Run scheduled work in the cloud, even when your computer is off.
Both
MCP connections, subagents, and terminal workflows.

Test both on your own codebase. Real tasks reveal more than benchmarks.

13

10 · Share skills across both

Both tools use a SKILL.md file with a name and description.

  • Codex reads skills from .agents/skills
  • Claude Code reads skills from .claude/skills
  • Keep the shared logic in scripts both can run
  • Keep tool-specific notes short

Check each tool’s documentation for format differences before copying skills between them.

14

11 · Connect the same tools with MCP

Both support the Model Context Protocol, so you can connect the same documentation, issue tracker, or database to each.

Codex
codex mcp add
Claude Code
claude mcp add

Give each agent only the servers its role needs.

15

12 · Set safe permissions in both

Codex

Sandbox mode plus approval policy. The Auto preset is workspace-write with on-request approvals, and network access is off by default.

Claude Code

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

Both agents should ask before pushing, deploying, deleting, or touching secrets.

16

13 · Control cost and usage

  • Use the cheapest model that does the job well
  • Raise effort only for hard problems
  • Use reviews on important changes, not every typo
  • Switch tools when one hits a limit
  • Keep instructions concise to save context

Codex uses /model to change models and reasoning effort. Claude Code uses /model and /effort.

17

14 · Keep humans in charge

Personally review:

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

Both companies warn that their agents can make mistakes. Two agents agreeing is not proof.

18

Who does what

Let the agents handle

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

Keep humans responsible for

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

The two-agent workflow

Rules
One shared AGENTS.md.
Plan
One agent plans, the other critiques.
Build
One agent implements on its own branch.
Review
The other agent reviews the diff.
Fix
Address valid findings.
Test
Run the full test suite.
Approve
A human reviews and merges.
Learn
Update AGENTS.md with new lessons.
20

Master two-agent prompt

Give this to the building agent:

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 change. Wait for my approval. Then implement the change on a new branch, add or update tests, and run the full test suite. When finished, summarize what changed, why, and what a reviewer should check most carefully. Do not push, deploy, or delete anything without asking me.

Then ask the other agent to review that summary and the diff, focusing 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

Start with one shared rulebook and one cross-review on your next important change, then expand the workflow.

More free guides

Every guide is free to read, no signup.

Weekly newsletter

Join my email newsletter for the newest tools and visual guides.

Discover new tools and websites, plus fresh visual guides delivered every Monday.

Open stats

Live traffic, fully public

This site's analytics are open for everyone to see.