Claude Code

Agent view: manage many background Claude Code sessions on one screen

TL;DR

Agent view is one screen for every background Claude Code session: which are working, need you or are done. Dispatch with --bg, peek with Space, try parallel approaches with /fork; remember each session uses its own quota.

You're running three Claude Code sessions in three terminal tabs: one fixing a bug, one writing tests, one investigating a flaky test. Then you lose track: which is waiting for your answer, which is done? Agent view is a single screen for managing many background Claude Code sessions: what each is doing, which need you, which are finished. It's a research preview, so the interface and shortcuts may change.

Opening and dispatching

claude agents                          # open agent view
claude agents --cwd ~/projects/app     # only sessions under this directory
claude --bg "investigate the flaky test"  # dispatch straight to the background
claude --bg --name flaky-fix "investigate the flaky test"

In agent view, type a prompt and press Enter to start a new background session. To push a normal session into the background, run /bg, or press ← on an empty prompt.

States and shortcuts

IconState
AnimatedWorking
YellowNeeds your input
DimmedIdle
GreenCompleted
Red / GreyFailed / Stopped
  • Space: peek at output or the pending question and reply without attaching.
  • Enter or →: attach; ← on an empty prompt: back to the list.
  • Ctrl+T: pin so the process keeps running; Ctrl+R: rename; Ctrl+S: group by state or directory.
  • Ctrl+X twice within 2 seconds: stop, then delete; ?: show all shortcuts.

Copying a session with /fork

/fork copies the current conversation into a new background session while the original keeps running. The copy keeps the model, permission mode and effort. /fork <prompt> starts the copy working immediately, handy for trying two approaches in parallel from the same context.

Shell commands

claude attach <id|name>   # attach in this terminal
claude logs <id|name>     # recent output
claude stop <id>          # stop
claude rm <id>            # remove from the list (transcript is kept)

Risks and caveats

  • Each session uses your quota independently: five parallel sessions mean five times the usage. Don't open background sessions for small jobs.
  • Automatic worktrees: before editing files, a background session moves into its own git worktree under .claude/worktrees/ so sessions don't collide. Set worktree.bgIsolation to "none" to edit the working copy directly.
  • Idle sessions get stopped: sessions that are finished or waiting and unattached for about an hour are stopped to free resources; their conversations are kept and resume when you attach.
  • Shutting down stops them: shutting down your machine stops running sessions. For work that must continue when the machine is off, use cloud sessions.

How to apply it

  • Dev: Push long investigations (flaky tests, log digging) to the background with --bg --name and keep coding in your main session.
  • Tech Lead: Use /fork to compare two approaches in parallel and keep the better one.
  • PM: Name sessions after tickets so agent view shows at a glance which work awaits a decision.

Sources & references

  1. Manage multiple agents with agent view — Claude Code Docs