// workflows

How to run multiple Claude Code sessions in parallel

· 6 min read

Claude Code is built around one session per project directory. The moment you work on more than one repository — an API, a frontend, an infra repo — you end up juggling terminals by hand: open a window, cd into the project, start the agent, drag the window somewhere, repeat. Five projects in, half your screen time is window management.

This post walks through a setup that turns all of that into one command: every project in its own terminal, Claude Code already running in each, tiled into a grid across your monitors.

Why parallel sessions are worth it

Agentic coding changes the shape of your time. While Claude Code works through a task, you are mostly waiting — reviewing diffs, answering the occasional question. A single session leaves that waiting time dead. With several sessions running side by side, you rotate: unblock the agent that needs input, review the one that finished, let the rest keep working. The bottleneck moves from the agent’s speed to your ability to see, at a glance, which session needs you.

That means the real problems to solve are:

  • launching N projects with N agents without doing it by hand,
  • arranging the windows so every session is visible,
  • knowing which session is working, which is blocked, and which is done.

One command to launch everything

mAgent (installed as magent) exists for exactly this. Install it and run it once:

pip install magent-multi-ai-agents-manager
magent

The first run scans your Claude Code, Codex, and VS Code history, finds your recent projects, and writes a config. The second run launches the fleet:

$ magent --go
✓ 2 monitors · launching 8 windows · resuming sessions…

Each project opens in its own terminal window with Claude Code started inside it, and every window is auto-tiled into a grid across all connected monitors. No dragging, no manual cd, no retyping claude eight times.

Sessions resume, too: each window starts with claude --continue, so every project picks up its latest conversation instead of starting cold. More on that in auto-resuming Claude Code and Codex sessions.

Seeing which session needs you

With eight sessions running, the question is always “where should I look next?” magent watch answers it with a live table of every agent session, sorted most-urgent first:

$ magent watch
#  project   tool     state
1  web       claude   needs-input
2  infra     codex    error
3  api       claude   working
4  worker    codex    done

States come from your agents’ own lifecycle hooks — working, needs-input, done, error — and on Windows, pressing a row number jumps focus straight to that window. Wiring the hooks for Claude Code and Codex is one command: magent hooks install. For scripts and CI there is magent status --json.

Scaling the pattern

A few habits make a many-session setup stay manageable:

  • Group your projects. Not every session belongs in every work block. magent -g <group> launches one named group — client work, internal tools, experiments — instead of the whole fleet.
  • Keep the grid stable. The same project should land in the same tile every day. Muscle memory does the rest: you stop reading window titles and just look at “the api corner.”
  • Let states interrupt you, not curiosity. Alt-tabbing through sessions to check on them defeats the point. Watch the table; react to needs-input and error.

Mixed fleets work the same way — some projects on Claude Code, some on Codex CLI, some on Cursor. Anything on your PATH can be launched per project.

Get set up

The full walkthrough — requirements, install options, first-run config, and the state-hook wizard — is in the install guide. It takes about two minutes from an empty terminal to a tiled, resumed workspace. And when the machine restarts, here is how to resume a Claude Code session after a restart without rebuilding the fleet by hand. Once the sessions are running, the habits that keep a bigger fleet manageable are in managing a fleet of AI coding agents across projects.

get mAgent — 2 min install ← all postsread as markdown