How to run several AI coding agents at once without losing track
Short answer: Give each agent its own git worktree so their edits cannot collide, watch them all from one screen with Claude Code’s agent view, cut down the permission prompts each one raises, and set up an alert so you know the moment one is waiting on you.
Running one agent is easy to follow. Running three is where things go wrong: two agents edit the same file, one sits blocked on a prompt for twenty minutes, and you lose track of which terminal tab was doing what. Four habits fix most of it.
1. How do I stop agents from overwriting each other?
Give each one a separate git worktree. A worktree is a second checkout of your repository on its own branch, in its own folder. Claude Code can create one for you:
claude --worktree feature-auth
Run the same command with a different name in another terminal to start a second, isolated session. Your repository needs at least one commit first.
Each session now edits its own copy. You merge the branches when the work is done, the same way you would merge a colleague’s.
2. How do I see what every agent is doing?
Use agent view. Run:
claude agents
It lists your background sessions on one screen and shows a state for each:
| State | Meaning |
|---|---|
| Working | Claude is running tools or writing a response |
| Needs input | Claude needs an answer or a permission from you |
| Idle | Nothing to do, ready for your next prompt |
| Completed | The task finished successfully |
| Failed | The task ended with an error |
| Stopped | You stopped it, or it was ended from outside |
You can start a new background session from that screen by typing a prompt, or from your shell:
claude --bg --name login-fix "fix the login test"
Inside a running session, /background moves it to the background. From agent view you can attach to any session to see the full conversation and answer it.
Agent view is a research preview, so the interface may change. Four limits are worth knowing. Sessions run on your own machine. Each one uses your subscription the same as an interactive session, so ten at once use it about ten times as fast. Shutting down or restarting your computer stops the ones that are running. And deleting a session in agent view deletes the worktree Claude created for it, so commit your changes first.
3. How do I keep them from stalling on prompts?
Three agents raise three times the permission prompts. Reduce them before you scale up:
- If you are in Manual mode, work in
acceptEditsso file edits do not prompt. It also runs file commands such asrmandmvinside your project without asking. - Add allow rules for the commands you approve every time, such as your test and build commands.
- Add deny rules for anything that should never run.
The details are in the guide to permission prompts.
4. How do I know when one needs me?
This is the part most people skip, and it is the one that costs the most time. An agent waiting on a prompt you have not seen is doing nothing.
- While agent view is open, Claude Code sends a notification when a background session needs input, finishes or fails. The terminal tab title also shows how many are waiting.
- Outside agent view, a
Notificationhook can show a desktop alert or play a sound whenever any session is waiting. - If you leave your desk, a hook can push to your phone.
- For Codex, turn on
tui.notificationsin~/.codex/config.toml.
Setup steps for each are in the guide to agent notifications.
What habits help?
- Name every session for the task it is doing. “login-fix” tells you more than a tab number.
- One task per session. A session with a single clear goal finishes sooner and is easier to review.
- Plan first for risky work. Start the session in plan mode so it proposes changes before making them.
- Review in order of who is waiting. Clear the sessions that need input first, then review the finished ones.
- Start with two. Add a third agent only when two feel easy to follow.
Where does Nubby fit?
Nubby sits on your desk and tells you when your AI agents need you, finish or fail, and you can answer yes or no without switching windows. With several agents running, it means you can keep your eyes on your own work and still see the moment one of them is stuck.
Nubby works with Claude, including Claude Code and Claude chats, and with Codex to start. Its Founder Edition is not open yet. You can join the waitlist and we will email you the day it opens.
Sources
- Claude Code: common workflows, parallel sessions with worktrees
- Claude Code: manage multiple agents with agent view
- Claude Code: choose a permission mode
- Claude Code: configure your terminal, notifications
- Codex: configuration reference
Last checked against the official documentation on November 14, 2026. Nubby is not affiliated with, endorsed by or sponsored by Anthropic or OpenAI. Claude and Claude Code are products of Anthropic. Codex is a product of OpenAI.