# Claude Code vs Codex: how to give both the same task on your own code

> Give Claude Code and Codex the same task in two git worktrees of one project in HB Code. Read each change. Then let one agent review the other change.

In HB Code a Codex session and a Claude session can work on the same project, each in a git worktree of its own. You give both the same task and read the two changes yourself. This page doesn't say which agent is better.

HB Code is a desktop app for Mac and Windows. It runs Claude Code and Codex on your own computer with your own Claude and ChatGPT plans.

## Steps

1. Make a second worktree of your repository in a terminal with git worktree add. HB Code lists the worktrees that exist and doesn't create one.
2. Press Add project in the sidebar. Choose the repository folder. Open the branch control in the top bar. Select the first worktree under Worktrees.
3. Press New session on the project. Choose Codex. Press Start Codex session. The session works in the worktree that is selected when you create it.
4. Select the other worktree. Press New session again. Choose Claude. Press Start Claude session. Send the same task text to both sessions.
5. When a run ends, open its session. Press View git changes in the top bar. The panel lists the changed files of the selected worktree, and each file opens its patch.
6. For a review, ask one agent to send its change to the other session. The sender thread shows a row Message to with the name of the other session. The answer arrives later as a row Message from.

## Notes

- Two sessions that you create in the same folder share its files. The second run sees what the first run changed, and View git changes shows the two changes in one list.
- HB Code doesn't create a worktree or a branch, and it has no view that puts two changes side by side. You compare the two patches yourself.
- A message between sessions in two folders waits for you. The exception is a recipient at the read-only level, Read only for Codex or Plan mode for Claude. To deliver a message that waits, press Send now in the recipient session.
- Each run uses the plan of its own agent account, your ChatGPT plan for Codex and your Claude plan for Claude Code. HB Code includes neither plan.

## Details in the handbook

- [Codex and Claude side by side](https://www.hbcode.ai/docs/agents.md#side-by-side): How Codex and Claude share one chat layer
- [What each agent can do](https://www.hbcode.ai/docs/agents.md#capabilities): How Codex and Claude share one chat layer
- [Messages between sessions](https://www.hbcode.ai/docs/message-delivery.md#session-messages): Message delivery: outbox, turn, history
- [Messages to another session](https://www.hbcode.ai/docs/tools/agent-tools.md#session-messages): Documents, speech, video, alerts, sessions, and session messages

## Guides

- [How to check usage limits and use more than one account](https://www.hbcode.ai/claude-code-usage-limits.md)
- [How to check what Claude Code or Codex did](https://www.hbcode.ai/claude-code-ui.md)
- [How to run several Claude Code and Codex sessions](https://www.hbcode.ai/claude-code-sessions.md)
- [How to use Claude Code or Codex on your phone](https://www.hbcode.ai/claude-code-mobile.md)
- [How to see what the subagents of Claude Code do](https://www.hbcode.ai/claude-code-subagents.md)
- [How to run Codex in a desktop app on Mac and Windows](https://www.hbcode.ai/codex-desktop-app.md)
- [Download HB Code](https://www.hbcode.ai/downloads)
