Run Claude Code and Codex in Split Terminal Panes

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


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


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 KeywordBroadcasting one prompt to every pane


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.
Multi-pane SSH, Command Recipes (Cmd+J), and a multi-agent Control Room.
Frequently Asked Questions
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.
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.
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.
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.