Do Claude Code and Codex read the same instructions file?
They can. Codex reads AGENTS.md. Claude Code reads AGENTS.md when there's no CLAUDE.md, or imports it with @AGENTS.md. [1][2]
Guide
Run Claude Code and Codex on one team and keep them out of each other's way: one AGENTS.md both agents read, a git worktree per agent, tasks claimed on a shared board so two agents don't take the same one, and a person who decides.
Give both agents the same rules in one AGENTS.md, give each agent its own git worktree and branch, and have every agent claim a task on a shared board before it starts, so two agents don't take the same one. Keep a person as the one who merges and makes the calls the agents shouldn't. In ARLI, each teammate brings their own agent into one pod, and people and agents share the same conversations and one task board.
Both tools read AGENTS.md, so write the team's rules once.
Codex reads AGENTS.md from ~/.codex, then from the project root down to your current directory. Files nearer your directory come later and take precedence. The combined size is capped at 32 KiB by default (project_doc_max_bytes). [1]
Claude Code reads AGENTS.md as project instructions when there's no CLAUDE.md (v2.1.277 and later). Before v2.1.281, some sessions, such as Amazon Bedrock or telemetry off, read CLAUDE.md only. If you already have a CLAUDE.md, or use one of those sessions, put @AGENTS.md in it to import the shared rules. [2]
Rules in these files are context, not enforcement. Use permission settings and sandboxes for anything that must not happen (see /guides/control-what-coding-agents-can-access). [2]
A short AGENTS.md for a two-agent team:
# Team rules for coding agents
- Claim a task before you start it. Don't work on a task someone else holds.
- Work on your own branch in your own worktree. Never edit another agent's branch.
- Run the tests and linter before you say a task is done.
- Report what you changed, what you ran, and what's still open.
- Ask a person before anything you can't undo: deploys, migrations, force-pushes.
Two agents editing one checkout will overwrite each other. A git worktree gives each agent its own checkout and branch from the same repository. [3]
git worktree add -b claude/auth ../app-claude-auth
git worktree add -b codex/dashboard ../app-codex-dashboard
Start Claude Code in one and Codex in the other. Claude Code can also create its own: claude --worktree feature-auth. [4]
Worktrees stop file collisions. They don't stop two agents from picking the same task, or from making changes that conflict in design. That's what the next section is for.
The most common failure on mixed teams is two agents doing the same job. Any tracker works if both agents can reach it and follow the claim rule. Fix it with a rule plus a place to enforce it:
Give each agent a separate task with its own acceptance criteria. "Claude does the auth flow, Codex does the dashboard and its tests" works. "Both improve the app" doesn't. If one agent reviews the other's work, it comments; it doesn't push to that branch.
A person merges, settles disagreements between agents, and approves anything irreversible. Make it easy for an agent to ask: one place where questions to people show up, instead of a stalled terminal.
A ARLI pod puts the shared board and the place to ask a person in one place, with each teammate's own agent next to the people who own it. Keep the AGENTS.md and worktrees from the sections above. The pod coordinates the agents; git still keeps their changes apart.
Sources, checked 2026-10-27.
1. OpenAI Codex docs, Custom instructions with AGENTS.md · 2. Claude Code docs, "How Claude remembers your project" (AGENTS.md section) · 3. Git docs, git-worktree · 4. Claude Code docs, "Common workflows" (Run parallel sessions with worktrees)
They can. Codex reads AGENTS.md. Claude Code reads AGENTS.md when there's no CLAUDE.md, or imports it with @AGENTS.md. [1][2]
Give each agent its own git worktree and branch, and have each claim a task before starting. [3]
Yes, if each connects their agent to the same board and follows the same claim rule. In ARLI, each person connects their own agent to the pod.
Create a shared workspace where each teammate brings their own agent, and each agent is a named member with an owner.
How to Connect Claude Code and Codex to a Shared Workspace · AI Agent Task Management: A Practical System for Humans and Agents · AI Agent Handoffs: Transfer Work Without Losing Context