How to Run Multiple Claude Code Agents Without Losing Track of Them
Once you start running more than one Claude Code session at a time, they all look like identical black boxes and you start typing into the wrong one. Claude Code has two small built-in commands that
July 4, 2026
How to Run Multiple Claude Code Agents Without Losing Track of Them
TL;DR: Once you start running more than one Claude Code session at a time, they all look like identical black boxes and you start typing into the wrong one. Claude Code has two small built-in commands that fix this: /rename names a session (shown on the prompt bar and in the /resume picker), and /color colors that session’s prompt bar. Add /resume to jump between them and /background to detach one, and a wall of identical terminals becomes a control panel. One honest caveat: these change Claude Code’s session and prompt bar, not your operating-system terminal tab.
If you have been vibe coding for more than a few weeks, you have probably felt this. You start with one Claude Code session. Then you open a second one so you can keep building the frontend while the first agent works through the backend. Then a third to chase a bug. Within a day you are running three or four Claude Code windows at once, and every single one looks exactly the same.
So you type a prompt into the wrong session. You lose track of which agent is doing what. You alt-tab into a window, stare at it for two seconds trying to remember what it was for, and alt-tab back out. The multi-agent setup that was supposed to make you faster starts costing you focus.
There are two commands built into Claude Code that fix this completely, and almost nobody uses them. Here is exactly what they do.
The problem: identical black boxes
The reason parallel agents get confusing is that a terminal has almost no visual identity. Every Claude Code session is the same dark window with the same prompt. There is nothing to tell your “frontend” agent apart from your “database migration” agent at a glance, so your brain has to hold that mapping manually. That works for one session. It falls apart at three.
The fix is simple: give each session a name and a color, so you can identify it in half a second instead of reading the scrollback to figure out where you are.
Command one: /rename
Inside any Claude Code session, run /rename and give it a name:
/rename frontend
That name now shows on the session’s prompt bar and in the /resume picker. When you have several sessions going, the name is how you know which agent you are actually talking to. If you run /rename with no name, Claude Code auto-generates one from the conversation so far, which is a decent fallback but less useful than naming it yourself after the job it is doing.
Name each session after its actual role: frontend, backend, bugfixes, research. The point is that the label matches the mental model you already have.
Command two: /color
Then run /color and pick a color:
/color blue
That colors the prompt bar at the bottom of the session. Your options are red, blue, green, yellow, purple, orange, pink, and cyan. /color default resets it, and /color with no argument picks a random one.
Color is doing something your name label cannot: it works from across the room and out of the corner of your eye. When two sessions sit side by side in split panes, a blue bar and an orange bar are instantly, pre-consciously different. You do not have to read anything. Give each agent its own color and your eyes do the sorting for you.
Running them like a control panel
Naming and coloring are about identity. Two more commands are about movement between sessions.
/resume opens a picker of your named sessions so you can jump into whichever one you want to drive next. Background sessions show up marked with bg. /background detaches the current session so it keeps working while you start a new one in the foreground. Together they let you fan out several agents and move between them without losing any of them.
There is also /theme, which is separate from the prompt-bar color. /theme changes the entire color scheme of a session, with auto, light, dark, and colorblind-friendly daltonized variants. If you want an even harder visual split, put one agent in light mode and another in dark. It is overkill for two sessions and genuinely helpful at five.
Put it together and the workflow is: start a session, /rename it after its job, /color it, repeat for each agent, and use /resume to move between them. Setup takes about a minute per session and you do it once.
The honest fine print
This is the part most people get slightly wrong, so it is worth being precise.
/rename names the Claude Code session. It shows on the prompt bar and in the /resume picker. It does not rename your operating-system terminal tab or window title.
/color colors Claude Code’s prompt bar for that session. It does not color the terminal background.
Coloring or titling the actual terminal tab is a feature of your terminal app, like iTerm2, Ghostty, or Terminal.app, not Claude Code. If you want your physical tabs color-coded too, that lives in your terminal’s settings, and it stacks nicely on top of what Claude Code gives you.
And to be clear about what these commands are: they label and color sessions. They do not spawn or run the agents by themselves. You still start each session yourself, in its own terminal pane or tab, or by detaching with /background. The two commands are the layer that keeps those sessions from blurring together.
Why this is worth a minute of your time
Running multiple AI agents at once is quickly becoming one of the highest-leverage habits in vibe coding. It is the difference between waiting on one agent and having three jobs moving in parallel. But parallelism only helps if you can actually keep track of what is running. The moment you lose the thread on which agent is doing what, you are not running three agents, you are running one and babysitting two.
/rename and /color are a five-minute setup that makes the multi-agent workflow sustainable instead of chaotic. They have been sitting in Claude Code’s command list the whole time. Turn them on, and a wall of identical black boxes becomes a control panel you can actually read.