Skip to content
  1. AskOnce home
  2. Blog
  3. How to use Claude Code and Codex in the same repo
DocsGet AskOnce
Can both run at once on the same branch?How do I run them in parallel with worktrees?How do I review one tool’s change with the other?How do both tools follow the same rules?How does each tool know what the other did?Questions
AskOnce blog · Guide

How to use Claude Code and Codex in the same repo

Take turns on one branch with a commit between turns, or work in parallel in separate Git worktrees so the two tools never edit the same files at once. Give both the same rules in AGENTS.md, and carry each session’s context to the other.

By Parth Chilwerwar · Updated 4 December 2026

Can both run at once on the same branch?

They can, but both then edit the same working folder. One may overwrite the other’s change, or build on half-finished work. Taking turns is safer: let one tool finish, commit, then start the other.

How do I run them in parallel with worktrees?

A Git worktree is a second working folder for the same repository, on its own branch. Give Codex one and keep Claude Code in the original folder:

git worktree add ../myapp-codex -b codex/search-filters
cd ../myapp-codex
codex

Each tool now changes only its own folder. When Codex is done, merge or rebase its branch, then remove the folder with git worktree remove ../myapp-codex.

How do I review one tool’s change with the other?

Let the tool that didn’t write the change review it, and keep it read-only while it does. For example, after Claude Code finishes, ask Codex: “Review git diff main for bugs, missing tests and risky changes. Don’t edit any files.” A second model often catches different mistakes.

How do both tools follow the same rules?

Keep the rules in AGENTS.md and import it from CLAUDE.md with @AGENTS.md. AGENTS.md vs CLAUDE.md shows the two-line setup.

How does each tool know what the other did?

Only through the files, unless you tell it. Paste a handoff when you switch, or let AskOnce give each new chat a brief of the other tool’s latest work in that project.

Questions

Do Claude Code and Codex conflict if installed together?

No. They install and keep their settings separately, in the .claude and .codex folders of your user profile. Conflicts only come from both editing the same files at the same time.

Which tool should review the other’s code?

Either. Have the tool that didn’t write the change review it, and keep it read-only while it does.

Do I need worktrees?

Only for parallel work. Taking turns on one branch, with a commit between turns, is enough for most tasks.

Stop explaining your project twice.

AskOnce gives each new Claude Code or Codex chat a short, local brief of your work in the other tool. Free, for Windows. Get AskOnce or read the docs.

More guides

  • How to share context between Claude Code and Codex
  • Hit your Claude Code usage limit? Continue the task in Codex
  • A handoff prompt for Claude Code and Codex
  • AGENTS.md vs CLAUDE.md: what Claude Code and Codex read