Mel – the agentic terminal
The agentic team for coding.
How to run Claude Code and Codex together in one terminal
November 19, 2026 · 7 min read
- Two ways: open claude and codex in their own worktree tabs, or let a lead agent run both as workers with /orchestrate-cli.
- Claude Code and Codex run on your own Anthropic and OpenAI accounts, so they use no Mel credits.
- The lead checks the combined diff, build and tests on disk before it reports back.
- Mel – the agentic terminal runs on Mac, Windows and Linux.
You can run Claude Code and Codex together in Mel – the agentic terminal (openmel.dev) in two ways. You can open each one in its own tab, ideally in its own git worktree, and steer both yourself. Or you can start /orchestrate-cli and let a lead agent split one task, start Claude Code and Codex as workers in background panes, and check their combined changes before it reports back. Both CLIs run on your own Anthropic and OpenAI accounts, so running them inside Mel uses no Mel credits.
This guide covers why people run more than one coding agent, both setups step by step, how to keep two agents from editing the same files, what each plan allows, and the mistakes that waste a day.
Why run Claude Code and Codex together?
Most developers who pay for one coding agent end up trying a second. The two agents think differently, they hit their limits at different times, and one is often better at a kind of task than the other. Three reasons come up again and again:
- Limits. When one agent's plan limit runs out halfway through the afternoon, the other can carry on.
- A second opinion. Two agents that reach the same fix independently give you more confidence than one. When they disagree, the disagreement shows you where to look.
- Parallel work. A front-end change and a back-end change that do not touch the same files can run at the same time.
The hard part is not starting two agents. It is keeping track of them: which one is waiting for you, which files each changed, and whether the pieces fit together. That is what a terminal built for agents should handle.
Two ways to run them in Mel
| Side by side (you steer) | Orchestrated (a lead steers) | |
|---|---|---|
| How you start it | Type claude in one tab and codex in another | Type /orchestrate-cli and describe the task |
| Who splits the work | You | Mel's lead agent |
| How the agents run | Interactive, you type into each | As workers in background panes, hands-off |
| Who checks the result | You, in the code review panel | The lead checks diffs, builds and tests, then you review |
| Best for | Separate tasks you want to watch | One bigger task with parts that depend on each other |
| Credits | None for the CLIs | None for the CLIs; the lead is Mel's own agent |
Option 1: Claude Code and Codex side by side
Before you start, install Claude Code and the Codex CLI the way Anthropic's and OpenAI's instructions say, and sign in to each once in any terminal. Mel does not install them for you.
- Download Mel for Mac, Windows or Linux and open it. The terminal needs no account.
- Track the repository. Inside your project, open the + new-tab menu and choose Track this repo for worktrees.
- Open one worktree per agent. Choose Worktree: your-repo from the same menu, once for each agent. Mel makes a new branch, checks it out under
~/.mel/worktrees/<repo>/<branch>and opens a tab there. - Start the agents. Type
claudein the first tab andcodexin the second. Each opens as a full interactive session, with Mel's tool belt around it. - Watch both from one place. The Runs screen (Ctrl+Shift+M, or ⌃⇧M on a Mac) lists every run under Needs you, Running and Recent. When an agent stops and waits for you, Mel tells you once, through the notification bell and a desktop notification, even from another tab.
- Review each branch. Press View changes (Ctrl+Shift+=, or ⌘⇧= on a Mac) to open Mel's code review panel on what that agent changed. Then merge the branch you want with git.
Mel finds claude and codex even when you open Mel from the Dock or a launcher, because it loads your login shell's environment at startup. If you see command not found, check that the command works in your usual terminal, then restart Mel. The CLI agents guide covers the details.
Option 2: let a lead agent run them as workers
For one task with several parts, let a lead split it.
- Open Mel's agent with Ctrl+Enter (⌘↵ on a Mac) in your project folder.
- Type
/orchestrate-cliand describe the task with a clear finish line. For example: "Add rate limiting to the API and a settings page for it. Done means the existing tests and two new ones pass." - Check the plan. The lead decides which files each worker owns, the interfaces they share and what "done" means for each part. Unless autonomous mode is on, a card asks "Can I start additional agents for this task?" and shows the proposed workers, which you can edit.
- Let it run. The lead starts Claude Code as
claude --permission-mode acceptEdits -p '<task>'and Codex ascodex exec --full-auto '<task>', each in a background pane. Workers appear as pills above the conversation. Click one to watch it live. - Read the result. The lead does not take the workers' word for it. It checks the changes on disk, runs the build and tests, and writes a summary for each worker: what changed, what to flag and how to proceed.
- Review the combined diff in the code review panel before you commit.
Lead and workers share project memory through remember and recall, so a decision one agent makes, such as "the API lives in src/api", is visible to the others. See orchestration for the full lifecycle.
Note: workers run hands-off, so a permission prompt inside one cannot stall the rest. Give orchestration a task in a git repository you can review and roll back, and read the combined diff before you merge.
How to stop two agents from editing the same files
Two agents in the same folder will sooner or later change the same file. Three habits prevent it:
- One worktree per agent when you steer them yourself. Each has its own branch and folder, and you merge the one you want.
- Owned files per worker when a lead steers them. The lead assigns files to each worker in its plan. Check that list on the confirmation card.
- One finish line per task. "Make
test_rate_limitpass" is a finish line. "Improve the API" is not, and two agents will improve it in two directions. Our guide on how to write a task an agent can finish shows the pattern.
What does it cost?
Claude Code and Codex run on your own Anthropic and OpenAI accounts or plans, and running them inside Mel does not use Mel credits. Shell commands never use credits either.
Mel's own agent, which leads an orchestrated run, runs either on your own provider key (0 Mel credits on any plan) or on your plan's credits. How many orchestrated workers run at once depends on your Mel plan:
| Mel plan | Price | Workers at once |
|---|---|---|
| Free | $0, with your own provider key | 1 |
| Pro | $20 a month | 3 |
| Max | $200 a month | 8 |
| Business | $50 a seat a month, 2 seats minimum | 3 per seat |
Running agents side by side in tabs has no such limit beyond your machine and your CLI plans. Full details are on pricing and billing and usage.
Mistakes that waste a day
- Two agents, one folder, no plan. Use worktrees or owned files.
- Trusting "done". An agent saying it finished is not the same as the tests passing. Run them, or let the lead run them, then read the diff.
- Vague tasks. Without a finish line, neither agent knows when to stop.
- Forgetting the waiting agent. Watch the Needs you group on the Runs screen, not each tab.
- Skipping review because two agents agreed. Agreement raises confidence. It does not replace reading the change. Our guide on keeping an AI coding agent under control helps.
How this compares with other ways to run several agents
Some tools run several agents in sandboxed cloud environments. Mel runs them on your own computer, in your own terminal and folder, with your shell's environment, and its lead agent checks the combined result on disk. Which is better depends on whether you want the work on your machine or in the cloud. Our Codex CLI vs Claude Code vs Mel comparison and Claude Code alternatives go further.
Frequently asked questions
Can I run Claude Code and Codex at the same time? Yes. Open each in its own Mel tab, ideally in its own git worktree, or let a lead agent start both as workers with /orchestrate-cli.
Does running Claude Code or Codex in Mel cost Mel credits? No. They run on your own Anthropic and OpenAI accounts. Mel credits are only for Mel's own agent.
Do I need to install Claude Code and Codex separately? Yes. Install each the way its maker says and sign in once. Mel finds them through your login shell.
Which other coding-agent CLIs does Mel recognise? Mel also recognises opencode, copilot, amp, droid and gemini, and you can add other programs in Settings.
Do orchestrated workers ask me for approval? No. Workers run hands-off so a prompt inside one cannot stall the rest. Whether a lead may start workers at all is a setting: always ask, always allow, or never.
How many workers can run at once? 1 on Free, 3 on Pro, 8 on Max and 3 per seat on Business.
Does Mel work on Windows and Linux too? Yes. Mel runs on Mac, Windows and Linux, and there is a VS Code extension.
Try it
Download Mel, open two worktree tabs and type claude in one and codex in the other. When you are ready to hand a whole task to a team, type /orchestrate-cli.
*Claude Code and Codex are trademarks of their owners. Mel is not affiliated with or endorsed by Anthropic or OpenAI.*
Mel – the agentic terminal · openmel.dev. The agentic team for coding.

Lalla is a hands-on tech founder, agentic infrastructure architect and the vision behind Mel.
Follow on LinkedIn