Guide

Claude Code agent view: run and watch background sessions

Updated

Also in: Deutsch, Français, Español, Português

On this page

Agent view (claude agents) is Claude Code's research-preview screen for local background sessions, each a full Claude Code conversation that keeps running without a terminal attached. It puts waiting sessions near the top across Pinned, Ready for review, Needs input, Working and Completed groups, so you can dispatch, peek and reply from one list. You can manage background agents there, or see them on a keypad or phone with Orbtile.

Orbtile showing live coding agent sessions on a Mac panel, a Logitech MX Creative Keypad and an iPhone

Start background sessions

Agent view lists background sessions only. A session in another terminal doesn't appear until you move it to the background. There are three ways to get one:

  • From your shell: claude --bg "<prompt>" starts a session that runs without a terminal.
  • From a running session: type /bg, or press ← on an empty prompt. The conversation moves to the background and keeps working.
  • From agent view itself: type a prompt in its input and press Enter to dispatch a new session.

--background is the long form of --bg, and both check workspace trust first and fail if combined with -p or --print. To run a background shell job in a PTY instead of a Claude session, use claude --bg --exec from your shell or type ! <command> in agent view. Inside an interactive session, /background is the full name of /bg, and you can pass a prompt to send one final instruction before detaching.

/fork copies a session into a new background session, while the original keeps running.

Pass a prompt to /fork to start the copy immediately, or omit it to leave the copy waiting in agent view. When agent view is turned off, /fork starts a forked subagent instead.

Dispatched background sessions run the built-in claude catch-all agent by default. In agent view's input, start with <agent-name> or mention @<agent-name> to run a custom subagent as the main agent, or mention @<repo> to target a child git repository or registered worktree.

In the dispatch input, /model, /effort and /fast set defaults for subsequent dispatches without writing to a settings file, with /effort and /fast requiring Claude Code v2.1.299 or later. Typing bare /resume or /continue opens a picker of past repository sessions to restore as background rows, unless agent view was scoped with --cwd, started with --safe-mode, or opened with a flag such as --permission-mode or --settings.

To delegate work inside a single conversation with custom subagents, background Bash tasks and lifecycle hooks, see Claude Code background agents: subagents, tasks and hooks.

Background sessions vs background subagents and tasks

Subagents work inside a single session, whereas agent view runs separate parallel conversations managed by a background supervisor process.

FeatureBackground sessionsBackground subagents
ScopeSeparate parallel Claude Code conversationsHelper work inside a single session
How to startclaude --bg, /bg, ←, /fork or agent viewAgent delegation or /subtask <task>
Where to watchclaude agents/tasks inside the current session
Permission promptsAttach to the row in agent viewSurfaced in the main conversation

Subagents Claude spawns from the main conversation start in the background by default, except web-fetch. /subtask <task> spawns a forked background subagent whose result returns to the current session, and /tasks, also available as /bashes, lists background work including finished subagents. Subagents and agent team teammates never appear as separate rows in agent view. Pressing Esc on a subagent's permission prompt denies that single tool call without stopping the subagent.

Open agent view by default and configure it

To make bare claude open agent view instead of a new conversation, run /config defaultToAgentsView=true in a regular session, or open /config and turn on Open agents view by default. Pass a prompt such as claude "fix the login test" to start a regular session while it is on, or run /config defaultToAgentsView=false to turn it off.

SettingWhere it livesWhat it does
defaultToAgentsView~/.claude.jsonDefault false; makes bare claude open agent view instead of a new conversation
leftArrowOpensAgents~/.claude.jsonDefault true; controls whether ← backgrounds a foreground session while still allowing ← to detach
disableAgentViewAny settings file, including managed settingsTurns off claude agents, --bg, /background and the supervisor
worktree.bgIsolationAny settings fileSet to "none" so dispatched background sessions edit your working copy directly

Read the list

Run claude agents. Add --cwd <path> to see only the sessions started under one project.

GroupWhat's in it
Needs inputA question, a permission prompt or another dialog is waiting
WorkingThe session is running
CompletedDone, plus failed and stopped sessions

Pinned sessions and a Ready for review group sit above these. A session's icon shows its state: Needs input is yellow, Completed green, Failed red, Stopped grey.

claude agents also accepts flags including --permission-mode, --model, --effort, --agent, --settings, --add-dir, --plugin-dir and --mcp-config. Working rows show an animated icon and Idle rows look dimmed.

Icon shapes show process status: ✻ or animated ✽ means running or waiting on you, ∙ means the process exited and restarts when you reply or attach, and ✢ marks a sleeping /loop session. Linked pull requests show at the right edge as #1234, or !1234 for GitLab merge requests. Their label is yellow when waiting on checks or review or when checks failed, green when checks pass with no blocking review, purple when merged and grey when draft or closed.

You can organise and filter rows inside agent view:

  • Group by directory: press Ctrl+S to switch between state and directory grouping across runs.
  • Pin a session: press Ctrl+T to pin a session to the top and keep its process running while idle.
  • Rename a session: press Ctrl+R to rename the selected session.
  • Stop or delete: press Ctrl+X to stop a session, then Ctrl+X again within two seconds to delete it.
  • Filter sessions: start the dispatch input with a:<name>, s:<state>, o:<text> or a pull request number such as #1234.
  • Find by name: use n:<text> or Ctrl+F to match a session's name or first prompt on Claude Code v2.1.287 or later.

Outside agent view, manage sessions from your shell with claude attach <id|name>, claude logs <id|name>, claude stop <id>, claude respawn <id|--all>, claude rm <id> and claude daemon status, claude daemon logs or claude daemon stop --any [--keep-workers]. Matching by name in claude logs requires Claude Code v2.1.290 or later. For scripts, run claude agents --json, or add --all to include completed rows, to read state, status and waitingFor rather than internal files under ~/.claude/jobs/.

Reply without leaving the list

  • Press Space to open a session's peek panel, type your reply and press Enter.
  • For a question with set choices, press the choice's number, then Enter.
  • A permission prompt or other dialog can't be answered from the peek panel.
  • Press → or Enter to attach and answer it there, then press ← on an empty prompt to return to the list.
  • On a working session, /model, /effort, /rename and /usage run right away while other replies join the message queue.
  • Send /stop in the peek panel or while attached to stop a session immediately while keeping its transcript and any worktree.
  • Detaching with ←, Ctrl+Z, /exit, double Ctrl+C or double Ctrl+D never stops a background session.

While agent view is open, Claude Code also notifies you when a background session needs input, finishes or fails. It fires the Notification hook with the agent_needs_input or agent_completed type, and the terminal tab title shows how many sessions are waiting. In a regular session, a ← 2 agents hint in the footer counts the ones waiting on you.

Scheduled sessions such as /loop notify only when they need your input, and agent_needs_input and agent_completed fire only while agent view is open in a terminal. In regular terminal sessions, the Notification hook emits permission_prompt after about six seconds idle and idle_prompt after about 60 seconds idle with no background agent running, while the PermissionRequest hook fires immediately. For question and plan prompts across sessions, see Know when Claude Code asks you a question or wants a plan approved.

Know the limits

  • It's a research preview. The screen and the shortcuts can still change.
  • Sessions are local. They survive sleep and stop when your computer shuts down.
  • Shutdown states. Sessions stopped by shutdown show as failed within 48 hours or stopped past 48 hours on Claude Code v2.1.248 or later.
  • Usage adds up. Each background session consumes your subscription quota the same as an interactive session.
  • Idle timeout. The supervisor stops unattached finished or waiting processes after about an hour unless you pin them with Ctrl+T.
  • Worktrees go with the session. Deleting a session in agent view also deletes the worktree Claude created for it, so commit its changes first.
  • Shell removal checks changes. Unlike pressing Ctrl+X twice in agent view, claude rm refuses deletion when uncommitted changes or unpushed commits remain.
  • Active watches stay foreground. While a /ship or /steward watch is on, /bg leaves the session in the foreground and prints the reason.

By default, dispatched background sessions move into an isolated git worktree under .claude/worktrees/ before editing files. Sessions backgrounded with /bg or ← stay in place, and setting worktree.bgIsolation to "none" keeps dispatched sessions in your working copy too. Sessions in Claude-created worktrees commit and push their isolated branch, never main or master, and open a draft pull request when appropriate.

See the same sessions on a keypad or your phone

Agent view lives in a terminal window. Orbtile puts your sessions on a Logitech MX Creative Keypad, an iPhone or an Android phone instead, next to your keyboard, so you see which one waits without switching to the terminal.

  • Background sessions: turn on Show background sessions in Orbtile's Claude Code settings so windowless, scheduled or headless runs get tiles too.
  • Everything else: follow local Claude Code sessions, SSH sessions for Claude Code, Codex and ZCode CLI, and local Codex, ZCode, Antigravity and Kimi Code.
  • Keypad answers: approve local Claude Code prompts with a hold on Allow or a tap on Deny, or pick numbered options and hold Send.
  • Away from your desk: Orbtile Away sends push notifications and lets you approve, answer multiple-choice questions and send follow-up instructions from your phone.

Orbtile runs on a computer with macOS 14 or later on Apple silicon or Windows 11 (x64), drives the Logitech MX Creative Keypad over USB without Logi Options+, and pairs with Orbtile Mobile on iPhone and Android. For permission prompt workflows across your terminals, see Approve agent tool calls without switching windows.

FAQ

Does agent view show the sessions in my other terminals?

No. Agent view lists background sessions only, and it does not list subagents or agent team teammates. Run /bg in an open session, or press the left arrow key on an empty prompt, to move it into the list.

Can I approve a permission prompt from agent view?

Not from the peek panel. Attach to the session with the right arrow key or Enter, answer the prompt there, and detach with the left arrow key without stopping the session.

Do background sessions keep running when my computer sleeps?

Yes. They are preserved across sleep and the supervisor reconnects on wake. They stop on shutdown, showing as failed within 48 hours or stopped past 48 hours on Claude Code v2.1.248 or later.

How do I open agent view by default in Claude Code?

Run /config defaultToAgentsView=true in a regular session, or turn on Open agents view by default in /config. Running claude with no arguments then opens agent view, while passing a prompt still starts a regular session.