knack
← all posts

Claude Code Agent View: Running and Managing Parallel Background Agents

Agent View is the dashboard for parallel work. The claude agents command, launching background sessions with --bg, monitoring, and when parallel agents help or hurt.

Anthropic shipped Agent View in Claude Code on May 11, 2026, and it changes how you run more than one session at once. Before it, claude code background agents meant a wall of terminal tabs, each one a separate Claude doing its own thing, and none of them telling you which one was stuck. Agent View pulls all of that into one screen. You run claude agents, and every session you have going shows up as a row that says what it's doing, whether it's blocked on a decision, and what it produced.

This is a how-to. If you already run several Claude Code sessions in parallel and spend half your attention just remembering which tab is which, this is the feature that fixes it. It's in research preview and needs Claude Code v2.1.139 or later, per the Anthropic docs. Check yours with claude --version.

What background agents in Claude Code actually are

A background session is a full Claude Code conversation that keeps running without a terminal attached, which is the whole point. You dispatch a task, walk away, and the work continues on a per-user supervisor process that the docs describe as separate from your terminal and from Agent View itself. You can close the tab, close the shell, and start something else, and the session is still going.

That supervisor starts on its own the first time you background a session or open Agent View. You don't launch it, configure it, or babysit it. It hosts each session as its own Claude Code process and reconnects to them after auto-updates, so an in-flight task survives the binary getting replaced under it. The one hard limit is that sessions live on your machine. They're preserved across sleep, but per the docs they stop if the machine shuts down.

One thing is worth saying plainly before you scale up. Each background session burns your subscription quota independently, so ten agents in parallel use your usage roughly ten times as fast as one. That math matters later.

The claude agents dashboard

Run claude agents and the dashboard takes over the full terminal. It lists every background session you've started, across every project, grouped by state. Sessions that need you sit at the top. A session running in one repo and another in a different worktree both show up here no matter which directory you opened the view from.

Here's roughly what a busy screen looks like, lifted from the structure in Anthropic's docs:

Needs input
  ✻ power-up design       needs input: double jump or wall climb?     1m

Working
  ✽ collision detection   Edit src/physics/CollisionSystem.ts          2m
  ✢ playtest level 3      run 12 · all checkpoints cleared          in 4m

Completed
  ✻ title screen          result: menu, options, and credits done      9m

Each row carries a one-line summary generated by a Haiku-class model, refreshed at most once every 15 seconds while a session works and once more when a turn ends. The row tells you what the session is doing without you opening its transcript. The icon's color is the state (yellow for needs-input, green for done, red for failed, grey for stopped), and its shape tells you whether the process is still alive or has exited and will restart when you touch it.

If a session opens a pull request, a PR #1234 label appears at the right edge, colored by status: yellow waiting on checks, green when checks pass, purple merged. For a lot of tasks that PR column is where you pick up the result. You wait for the number to go green, review it, and merge, and you never have to read the conversation.

To scope the dashboard to one project, pass --cwd (v2.1.141 or later):

claude agents --cwd ~/projects/my-app

And for scripting, claude agents --json prints live sessions as a JSON array and exits.

Launching background and headless agents

There are three ways in, depending on where you're standing.

From the dashboard itself, type a task in the input at the bottom and press Enter. A new background session starts and shows up as a row. Type another prompt, press Enter again, and you get a second session running alongside the first rather than a follow-up to it. That's how you build out a set of claude code parallel agents fast: one prompt, one row, repeat.

From inside a session you already have open, run /bg (the alias for /background) to push the current conversation into the background. You can give it a parting instruction if you want, like /bg run the test suite and fix any failures. Note that running subagents and monitors don't transfer when you background this way, and Claude asks you to confirm if any are in flight.

From your shell, pass --bg to start a session that goes straight to the background without ever opening a foreground tab:

claude --bg "investigate the flaky SettingsChangeDetector test"

This is the headless launch. Nothing takes over your terminal. Claude prints a short ID and the commands to manage the session, then hands you back your prompt. You can pin a specific subagent as the session's main agent by combining --bg with --agent:

claude --agent code-reviewer --bg "address review comments on PR 1234"

And --name sets a readable display name instead of the auto-generated one:

claude --bg --name "flaky-test-fix" "investigate the flaky SettingsChangeDetector test"

After it backgrounds, you get a block like this:

backgrounded · 7c5dcf5d · flaky-test-fix
  claude agents             list sessions
  claude attach 7c5dcf5d    open in this terminal
  claude logs 7c5dcf5d      show recent output
  claude stop 7c5dcf5d      stop this session

One detail saves you from yourself. Before editing files, a background session moves into an isolated git worktree under .claude/worktrees/, so parallel sessions read the same checkout but each writes to its own, and two agents touching the same repo won't clobber each other's edits. If worktrees are impractical for a repo, you can set worktree.bgIsolation to "none" (v2.1.143 or later), but then parallel sessions editing the same files will collide, so don't.

Monitoring and switching between sessions

The loop is peek, reply, attach, at three increasing depths of involvement.

Select a row with the arrow keys and press Space to peek. The peek panel shows the session's most recent output, or the exact question it's blocked on, instead of the full transcript. If it's a multiple-choice question, the panel shows the options and you press a number key. For anything else, type a reply and press Enter and the session picks back up, all without leaving the dashboard. Most of the time that's the entire interaction: you answer "yes, ship it" or "use the smaller migration" and move on. Use and to peek at adjacent rows without closing the panel.

When you want the full conversation, press Enter or on a row to attach. The session takes over your terminal as a normal interactive Claude Code session, and Claude posts a short recap of what happened while you were gone. To get back out, press on an empty prompt and you're returned to the table. Detaching never stops the session.

That shortcut is the real switching mechanism, and it works from any session, not only ones you attached from the dashboard. Press it on an empty prompt in any Claude Code session and it backgrounds the current one and opens Agent View with that row selected. You can flip between work streams without ever leaving the terminal: left arrow out, arrow keys to a different row, right arrow in. If you'd rather it not hijack the left arrow, there's a leftArrowOpensAgents setting in /config.

A few organizing moves earn their keystrokes. Ctrl+T pins a session to the top and keeps its process running while idle, which matters because an unattended session that finishes gets its process stopped after about an hour to free resources (it restarts when you touch it, just a beat slower). Ctrl+S regroups the list by directory instead of state, Ctrl+R renames, and Ctrl+X stops a session, with a second Ctrl+X within two seconds deleting it. Press ? any time to see the full shortcut list in context.

When parallel agents help, and when they hurt

Parallel pays off when the tasks are genuinely independent and you don't need to watch each step: a bug fix in one repo, a PR review in another, a flaky-test investigation in a third. Dispatch all three, keep working in your main window, and check back when a row flips to needs-input or shows a result. The worktree isolation means they won't step on each other's file edits, and the dashboard means you're not hunting through tabs to find the one that stalled. This is the case the feature was built for.

It hurts when the work isn't actually parallel. Five sessions editing overlapping logic in the same repo will each go off in its own worktree and reach a different answer, and now you're merging three conflicting solutions to one problem by hand, which is slower than having done it once. The other ceiling is your quota, since ten agents drain your usage about ten times as fast, so throwing sessions at a problem you could solve with one is just paying to wait. A useful rule from people running this hard is to keep each agent's task narrow and self-contained, the kind of thing you could hand to a competent contractor with a one-paragraph brief and no follow-up questions.

There's a coordination question underneath all of this. Agent View handles the running-many side. The making-them-work-together side, where sessions message each other and split a job, is agent teams, and the programmatic side, where you build agents into your own software, is the Claude Agent SDK. If you're designing how several agents divide labor on one project, that's a different problem than monitoring them, and it's worth reading up on multi-agent workflows before you scale past three or four.

One thing that makes parallel agents pull their weight: the tasks you hand them should be repeatable and well-scoped, which usually means packaging the workflow rather than retyping the prompt every time. Anthropic's docs note you can dispatch a skill from the Agent View input to start the same workflow without retyping it. If you want to build those skills without writing the SKILL.md by hand, Knack turns a short interview into a shippable Anthropic-format Agent Skill that runs across Claude Code, Codex, Cursor, and Gemini CLI, which is a clean way to feed a fleet of background agents consistent, reusable tasks.

Start with two sessions before you run ten. Get a feel for the peek-reply-attach rhythm, learn which kinds of task come back clean and which come back needing three rounds of input, and scale from there. The dashboard makes ten agents legible, but legible is not the same as right, and you still have to decide whether ten is the number you actually need.