MXterm Pro

Run Claude Code and Codex in Split Terminal Panes

Henry AGI
4 min read
Cover: run Claude Code and Codex in split terminal panes, with the Claude Code, Codex and MXterm icons.

To run Claude Code and Codex in split terminal panes, open a workspace in MXterm Pro, turn on "Isolate features in git worktrees" and pick Claude Code for one pane and Codex for the other. Each agent can work on its own branch in its own worktree instead of sharing one checkout. Isolation reduces branch collisions. It does not stop two agents editing the same file.

Why agents in one repo usually collide

MXterm Pro
Two agents in one repo: sharing one working copy can cause collisions, own worktrees per agent reduce them.
Two agents in one repo, with and without worktree isolation.

The failure is almost always the same. You open Claude Code in one terminal tab and Codex in another, point both at the same working copy, and give them different jobs. One agent runs git checkout -b feature-a while the other is mid-edit on main. Now you have uncommitted changes on the wrong branch, or a git status neither agent expects.

Even on one branch, agents editing overlapping files at the same time produce merge conflicts you have to untangle by hand.

Running them one after another avoids the collision but doubles your wait. You end up babysitting one agent while the other sits idle. The fix is not more careful turn-taking. Give each agent its own working copy on disk, so a git checkout in one pane cannot touch the other's files.

Step by step: split panes with isolation

MXterm Pro
Six numbered steps to run Claude Code and Codex in split terminal panes with git worktree isolation
Six numbered steps to run Claude Code and Codex in split terminal panes with git worktree isolation

1. Open a new workspace on your repo. From MXterm Pro's Welcome/New Workspace screen, pick the project folder.

2. Turn on "Isolate features in git worktrees". The app describes it as "Each agent pane starts in its own worktree and branch."

3. Add split panes with the split buttons in the pane header. More on splitting is in the panes docs.

4. Launch one agent per pane: Claude Code in one, Codex in the other. Each agent can work on its own branch in its own worktree.

5. Give each agent a distinct task, scoped to files that do not overlap where possible. For example, "refactor the auth middleware" in one pane and "update the settings UI" in the other. Isolation reduces the chance of branch collisions. It does not stop agents editing the same shared file, so split along real seams in the codebase.

6. Review and merge. When an agent finishes, merge its branch the normal way: git merge, review the diff, or open a PR. MXterm Pro does not merge for you. When you are done with a worktree, remove it from Settings > Agents, or clean up from the Git panel.

To keep each agent on its own branch, see isolating agents with git worktrees.

Related guideHow Command Recipes Works: Ready-Made Linux Commands, Matched by Keyword

Broadcasting one prompt to every pane

MXterm Pro
Broadcast Input for split terminal panes in two lists: what it does and what to watch out for
Broadcast Input for split terminal panes in two lists: what it does and what to watch out for

Turn on Broadcast Input when you want the same instruction sent to every agent at once, such as "run the test suite" or "pull latest and rebase".

While it is on, keystrokes typed into your active pane are mirrored to every other pane in the broadcast group. One npm test or one prompt reaches all of them without retyping it per tab.

Broadcast is blunt by design. It does not merge output or wait for one agent to finish before the next command lands. It just fans out the same keystrokes. Turn it off before typing anything pane-specific, like a follow-up answer to one agent's question. Otherwise that answer goes to every pane in the group.

The Control Room, and how it differs from plain split panes

The Control Room is a separate layer on top of split panes with worktree isolation, which stop agents colliding on disk. It lives in the right-hand panel of the window.

Put your agents in one room and stay in charge: in the Control Room, agents message each other and you are the Moderator. Messages wait while you type. The agents and Control Room docs cover the app side.

Token usage per agent

See token use at a glance, computed on your Mac. The title-bar chip covers Claude Code and Codex, two of the agents it reads. How token usage is counted has the detail.

When a plain terminal or tmux is enough

If a plain terminal or your existing tmux setup already meets your needs, you do not need another tool. MXterm is for when you want to see, for Claude Code and Codex, whether each agent is working, waiting or done, keep agent work apart on disk and answer their questions from one window. To try it, use the download page, and see running Claude Code in MXterm. For other agents you can run the same way, see best AI coding agents in 2026.

For Mac terminals compared for Claude Code, see the best terminal for Claude Code on Mac, and for the wider category, see what an agentic development environment is.

When it does not work: common snags

Both agents keep landing on the same files. Worktree isolation reduces collisions on branches and checked-out state. But two agents can still both decide to touch, say, a shared config file from their own copies. That is a task-scoping problem, not something isolation fixes. Split the work along real module boundaries.

Broadcast sent a reply to the wrong pane. This is the most common broadcast mistake. The mode stays on until you toggle it off, so an answer meant for one agent's follow-up question goes to all of them. Turn it off before anything pane-specific.

Merging the worktree branch back feels like extra steps. It is an extra step by design. Isolation keeps the working copies apart during the run, but MXterm Pro does not auto-merge. Treat each worktree branch like any feature branch: review the diff, then merge or open a PR the way you normally would.

See it running for yourself

Multi-pane SSH, Command Recipes (Cmd+J), and a multi-agent Control Room.

Download MXterm Pro

Frequently Asked Questions

What is the Control Room in MXterm Pro?

It is a shared right-panel workspace for running several AI CLI agents together. Agents message each other and you are the Moderator. Messages wait while you type. It is separate from split-pane worktree isolation: you can use either on its own, or both together.

Do I need git worktrees to run Claude Code and Codex in split panes?

No. You can run them in two plain panes without isolation if they work in different repos, or if you are comfortable managing branch switches yourself. Worktree isolation matters when both agents work in the same repository at the same time. Without it, one agent's git checkout can pull the branch out from under the other.

Can I use other CLI agents besides Claude Code and Codex?

Yes. Any CLI tool that runs in a shell works in a plain terminal pane, and Broadcast Input does not care which binary you launch. Worktree isolation applies to the agent panes you pick, such as Claude Code, Codex, Gemini CLI and OpenCode.

Does broadcasting a prompt wait for one agent to finish before sending to the next?

No. Broadcast Input mirrors your keystrokes to every pane in the group. It does not sequence or wait on agent output. It is meant for identical, short instructions (run tests, pull latest), not a conversation you want each agent to answer independently.

Ask AI about MXterm Pro

Open a live answer in ChatGPT, Claude or Perplexity, based on this page. The assistant writes it, not us, so check the sources it cites.

Question sentHow do I run Claude Code and Codex side by side in split terminal panes on a Mac?