AI CODING TOOLS / LESSON 16
Using Both on One Project.
Share one set of rules, hand work between tools, and stay safe

Loading the lesson…
Loading activities…
AI CODING TOOLS / LESSON 16
Share one set of rules, hand work between tools, and stay safe

Loading the lesson…
Loading activities…
You don't have to pick a side. Plenty of people run Claude Code and Codex on the same project. One builds and the other double-checks, or one gets stuck and the other takes a fresh look.
It works great, as long as you set things up so both tools follow the same rules and don't trip over each other's work. That's what this lesson is all about.
Claude Code reads CLAUDE.md. Codex reads AGENTS.md. Keep two separate files and sooner or later they drift apart. You add "always run the tests" to one and forget the other, and now your two helpers follow different rules while you sit there wondering why one keeps skipping the tests.
The fix is simple. Keep your shared rules in one file, and let the other tool read that same file.
Put all your shared project rules in AGENTS.md. Codex reads it automatically. Then make a tiny CLAUDE.md right next to it that imports the AGENTS.md file. In Claude Code, a line that starts with @ followed by a file path pulls that file in.
Claude Code reads AGENTS.md first through the import, then any Claude-only notes you put below it. Codex just reads AGENTS.md. Now both tools follow the same rules, and you only ever edit ONE file.
Recent versions of Claude Code read AGENTS.md on their own when the project has no CLAUDE.md at all. So the very simplest setup is just one AGENTS.md file and nothing else.
The catch? If anybody ever adds a CLAUDE.md to the project later, Claude Code switches to reading that one instead. Older versions of Claude Code also don't read AGENTS.md directly. Option 1 dodges both of those surprises, which is why we recommend it.
A symlink is a shortcut file that points at another file. You can make CLAUDE.md a shortcut to AGENTS.md.
This works, but Anthropic warns it causes trouble on Windows, where symlinks need special settings and can turn into a plain one-line text file. If anyone on your project uses Windows, stick with Option 1.
Same stuff you learned for CLAUDE.md. Keep it short and practical.
Here's the most important habit in this whole lesson. Use Git commits as the handoff point. A commit is a saved snapshot of your project. When one tool finishes a chunk of work, you commit it, and the other tool starts from that clean, saved snapshot.
You'll learn Git properly in the GitHub module. For now, here's the general shape of it.
A branch is a separate line of work, so your main code stays safe.
Open Claude Code (or Codex) in the project and give it the task. When it's done, read the changes yourself.
Writing which tool did the work in the message is a nice lil habit. Later, when you look back, you'll know who built what.
Open the other tool in the same folder and point it at the last commit.
When it's done, read the changes and commit again. That way each tool always starts from a saved, known-good spot.
This is where running both REALLY shines. Have one tool build something, then ask the other to check it. A second opinion catches stuff the first one missed.
Codex has a built-in /review command. Type it inside Codex and it reviews the changes in your working folder, then reports the problems it finds without changing your files. Want it to compare against a base branch like main instead? Run codex review from your regular terminal, which can review uncommitted changes, a base branch diff or a single commit.
In Claude Code, just ask in plain words.
Then decide which suggestions you agree with, and ask either tool to fix those.
Twice the helpers means twice the reason to be careful. These habits keep you safe no matter which tool is driving.
git diff in your terminal, or type /diff inside Codex. Never keep a change you haven't looked at.--yolo flag. In Claude Code, switch to Manual mode with Shift+Tab whenever you want to approve each step.AGENTS.md, imported by CLAUDE.md, so both tools play by the same rules.AGENTS.md and import it from CLAUDE.md with @AGENTS.md, so both tools follow one set of rules/review or a plain review request in Claude CodeYou've finished the AI Coding Tools module! You know how to work with Claude Code and Codex, and how to use them together. Next up is the GitHub module, where you'll pick up the Git and GitHub skills that make all this handoff stuff feel easy...