# Can Claude Code and Codex work on one repo with worktrees?

Canonical: [Can Claude Code and Codex work on one repo with worktrees?](https://contextingo.com/answers/claude-code-and-codex-on-one-repo-with-worktrees)

Locale: en

Purpose: Yes. Git worktrees give each agent its own checkout, so file changes do not collide. They do not share what each agent learned. Pair them with one owner per issue and shared project records, so both agents read the same decisions and failed attempts.

Content updated: 2026-10-29

Source revision: content.ts 2026-10-29

Maintenance owner: the Contextingo site owner

[Topic map](https://contextingo.com/llm/topics/answers.md) · [Complete scoped map](https://contextingo.com/sitemap.md)

**Short answer.** Yes. Git worktrees give each agent its own checkout, so file changes do not collide. They do not share what each agent learned. Pair them with one owner per issue and shared project records, so both agents read the same decisions and failed attempts.

## What worktrees solve

Separate working directories and branches for each agent.

## What they do not

- Two agents choosing different designs.
- One agent retrying what the other ruled out.
- Deciding which issue each one takes.

## A workable setup

1. One issue per agent, assigned on the Team board.
2. Both connected to the same project.
3. Small pull requests, accepted by a person.

## Go deeper

- [Git worktrees: how to run several coding agents in parallel without conflicts](https://contextingo.com/blog/git-worktrees-parallel-coding-agents)
- [How do I stop two AI agents from duplicating work or contradicting each other?](https://contextingo.com/answers/how-to-stop-two-ai-agents-duplicating-work)

## Questions

### Does Contextingo create worktrees?

No. It shares knowledge and ownership; you create worktrees yourself.
