Reference

Agents View Quick Reference

Use this when you already know the workflow and need the command, shortcut, or safety rule fast.

Primary source: Claude Code Agents View docs Related reference: Git worktrees Last checked: 2026-07-04

Core Loop

Openclaude agents DispatchType a task, press Enter MonitorRead group, icon, summary PeekSpace, reply, or choose AttachEnter for full session DetachLeft Arrow on empty prompt

Shell Commands

Command Use when
claude agents Open Agents View.
claude agents --cwd <path> Show sessions started under one project directory.
claude agents --json List live, working, and blocked background sessions as JSON.
claude --bg "prompt" Start a background session directly from the shell.
claude --agent <name> --bg "prompt" Run a named subagent as the main agent for that background session.
claude --bg --name "name" "prompt" Give the row a readable name immediately.
claude --bg --exec 'command' Run a shell command as a background job without invoking a model.
claude attach <id> Open a background session in the current terminal.
claude logs <id> Print recent output without opening Agents View.
claude stop <id> Stop a background session.
claude respawn <id> Restart a session with its conversation intact.
claude rm <id> Remove a session from the list; keeps Claude-created worktrees with uncommitted changes.
claude daemon status Inspect supervisor health and session counts.
claude daemon stop --any --keep-workers Restart a stalled supervisor while keeping running sessions alive.

Agents View Shortcuts

Shortcut Action
Up / DownMove between rows.
SpaceOpen or close the peek panel.
EnterAttach to selected row, or dispatch when the input has text.
Shift+EnterDispatch and attach immediately.
Right ArrowAttach to the selected row.
Left ArrowDetach from an attached session when the prompt is empty.
Ctrl+SSwitch grouping between state and directory.
Ctrl+TPin or unpin a session.
Ctrl+RRename a session.
Ctrl+XStop selected session; press again within two seconds to delete it.
Shift+Up / Shift+DownReorder selected session.
EscClose peek, clear input, or exit.
?Show all shortcuts in context.

Filters

Input Shows
a:<name>Sessions running the named agent.
s:<state>Sessions in a state such as s:working or s:blocked.
#<number> or PR URLThe session working on that pull request.
Any other URLThe session whose first prompt included that URL.

Use Peek When

  • You need the latest output, not the full transcript.
  • A row needs input and the answer is short.
  • You want to inspect PR links or the current blocker.

Use Attach When

  • You need full context.
  • You need to run normal Claude Code commands.
  • The session needs sustained steering.

Safety Rules