How to run Claude Code and Codex on the same project
Give each agent its own part of the code, and let each see the other's changes while it works. On a laptop that means two terminals on one checkout, where they can overwrite each other, or one git worktree each, where the conflicts wait for the merge; on Murmell both run side by side in one cloud directory, and a file is reserved by the agent writing it.
Step by step
- Open a project. Open Murmell in a browser and start a project, or connect an existing repository from GitHub, GitLab, Bitbucket or Codeberg. It runs on a cloud machine, so nothing is installed on your laptop.
- Connect both accounts. Sign in with your own Claude account for Claude Code and your own ChatGPT account for Codex. Each agent runs on the account it belongs to.
- Open a window for each agent. Open a Claude Code window and a Codex window on the canvas. Both are the real CLIs in real terminals, and both work in the same project directory.
- Give each one its part. Tell each agent which folders are its own and what the other one is doing. Split by area of the code, not by kind of task, so the two rarely need the same file.
- Let the reservations settle the rest. Before an agent writes a file it reserves it, and the other waits until it is released. You watch both terminals, and anyone you invite can watch and type with you.
The three usual setups
| Setup | How they share the code | What goes wrong |
|---|---|---|
| Two terminals, one checkout | Both see every file the moment it changes | Both can write the same file, and the last write wins |
| One git worktree per agent | Each has its own copy and its own branch | Neither sees the other’s new types or routes, and the conflicts arrive at the merge |
| Murmell | One directory on a cloud machine, a reservation per file | An agent waits when the file it wants is held by the other |
Split the work by folder
Whatever the setup, the split decides how much the two agents get in each other’s way. Give each one whole folders, for example the server to Claude Code and the interface to Codex. Files both sides need, such as shared types, routes and configuration, get one owner, and the other agent asks for changes instead of making them. Tell each agent in its first message what the other one is doing.
Why one directory instead of two branches
With a worktree each, Codex cannot use the interface Claude Code wrote an hour ago until somebody merges it. In one directory it can use it as soon as it is saved. The risk of one directory is two agents writing the same file, which is what the reservation removes: the board records one holder per path and refuses everyone else until the holder releases it. Multiple AI agents on one repo has the mechanism.
It keeps running without you
Both agents run on a cloud machine, not on your laptop, so closing the lid does not stop a run in progress. Run Claude Code in the cloud compares that with a server of your own and with Anthropic’s cloud sessions, and sharing a coding session covers bringing a teammate onto the same canvas.
Straight answers
Can Claude Code and Codex work on the same repository at the same time?
Yes. In one checkout they see each other's changes at once but can overwrite the same file. In separate git worktrees they cannot collide, but neither sees the other's work until you merge. On Murmell they share one directory and a file is reserved by the agent writing it.
Do I need a git worktree for each agent?
On a laptop, worktrees are the usual way to keep two agents apart, and tools such as Claude Squad and Conductor automate them. The cost is a merge at the end. On Murmell the agents share one directory, so there is nothing to merge between them.
Which tasks should go to Claude Code and which to Codex?
There is no fixed rule. Split the project by area, such as the server for one and the interface for the other, give shared files like types and routes a single owner, and compare the two on the same kind of work before settling on who does what.