Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Manage multiple agents with agent view changedagent-view

Nearest release: v2.1.335, published 8 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 3 Dec 2026 06:14 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 3 Dec 2026 06:37 UTC.

Upstream edited
Recorded here
Lines+22added
Lines−41removed
From line 257 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits90to this page, all time

##### Prompts sent as the session moves to the background

The whole hunk

from line 257, old and new numbered
/
lines
from line 257
257257 
258258#### Switch sessions without leaving the terminal
259259 
260In a session running in the foreground, one you started in the terminal rather than attached to from agent view, pressing `←` on an empty prompt backgrounds it and opens agent view with that row selected, so you can switch sessions without leaving the terminal. The same single press detaches an attached session.
260To switch sessions without leaving the terminal, press `←` on an empty prompt in a session you started in that terminal. The session moves to the background, and agent view opens with its row selected.
261261 
262If you press `←` right after you delete the last of the prompt's text or move through prompt history, Claude Code asks you to confirm. Press `←` again to switch.
262You can then open another session, go back, or exit:
263263 
264After you background a session with `←`:
265 
266* Press `Enter` to reopen the conversation.
267* Press `Esc` to undo the switch and return to the conversation. If `Esc` shows `Still starting — try again in a moment`, the background session isn't ready yet, so press `Esc` again in a moment.
264* Select a row and press `Enter` to open that session.
265* Press `Esc` to undo the switch and return to the conversation. If you see `Still starting`, press `Esc` again in a moment.
268266* Press `Ctrl+C` twice to exit to your shell.
269267 
270When Claude Code can't reopen the conversation, it exits and prints a `claude --resume` command that resumes it.
268If a tool is running when you press `←`, Claude Code waits up to about ten seconds for it to finish, then moves the session, and Claude continues the response there. Press `←` again to move the session right away. Claude Code waits longer while a [foreground subagent](https://code.claude.com/docs/en/sub-agents.md#run-subagents-in-foreground-or-background) is running or a permission prompt needs your answer.
271269 
272[Claude's task list](https://code.claude.com/docs/en/interactive-mode.md#task-list) moves to the background session with the conversation, so the checklist is intact when you return to that row.
270If you press `←` right after you empty the prompt or move through prompt history, press it again to confirm. If you see `Backgrounding cancelled`, do what the message says, then press `←` again.
273271 
274The row you pressed `←` from also keeps a bold, undimmed name after you move the selection with the arrow keys or the mouse, so you can tell which session you came from.
272Some work stops when the session moves:
275273 
276If a tool is running when you press `←`, Claude Code waits for it to finish before backgrounding, and Claude continues the response in the background session. Press `←` again to background immediately instead of waiting. When in-flight background work can't carry over to the background session, Claude Code shows the `Background this session?` dialog first, the same as with [`/background`](#from-inside-a-session).
274* **A shell command Claude is running in the foreground**: it stops, and Claude may run it again in the background session. To keep it running, press `Ctrl+B` to [turn it into a background command](https://code.claude.com/docs/en/interactive-mode.md#background-bash-commands) while Claude Code is still waiting.
275* **Foreground subagents**: they restart from the beginning if you press `←` again while they're running.
276* **A prompt or `!` shell command you enter as the session moves, or a prompt still waiting on [hooks](https://code.claude.com/docs/en/hooks.md)**: it stops or isn't sent. To send it again, open the session and press `↑` at its prompt to bring the text back.
277277 
278After about ten seconds, Claude Code backgrounds the session without waiting any longer, except in cases such as these:
278You can turn this shortcut off with the [`leftArrowOpensAgents`](https://code.claude.com/docs/en/settings-reference#leftarrowopensagents) setting in `/config`.
279279 
280* **Foreground subagents are still running**: Claude Code keeps waiting so the work of the [foreground subagents](https://code.claude.com/docs/en/sub-agents.md#run-subagents-in-foreground-or-background) that Claude started carries over, and shows `Still backgrounding after the current tool`. Press `←` again to background without waiting, which restarts those subagents from the beginning.
281* **A permission prompt or question is waiting for your answer**: while a permission prompt or a question Claude asked waits, Claude Code keeps waiting and shows `Still backgrounding after the current tool — a question is waiting for your answer.` If your answer lets the turn continue, such as **Yes** on a permission prompt, Claude Code backgrounds the session when the current tool finishes.
282* **You type into the prompt input**: Claude Code cancels the switch, because unsent text stays in your terminal's input box and wouldn't move to the background session. It shows `Backgrounding cancelled — you have unsent text in the input. Send it or clear it, then press ← again.` Claude keeps working in the foreground.
283* **You stop the turn**: Claude Code cancels the switch and shows `Backgrounding cancelled — the turn was stopped.` For example, the turn stops when you [interrupt Claude with `Esc`](https://code.claude.com/docs/en/interactive-mode#general-controls) or select **No** [without a comment](https://code.claude.com/docs/en/permissions.md#add-a-comment-when-you-answer-a-permission-prompt) on a permission prompt from the main conversation, or press `Esc` on a question Claude asks there. Press `←` again to background the session.
284* **A queued message can't move**: messages you [queued while Claude was working](https://code.claude.com/docs/en/interactive-mode.md#queue-messages-while-claude-works) move to the background session with the conversation. When one of them can't, the session stays in the foreground and Claude Code shows a notice such as `Cannot open agents — 1 queued message can't move to the background. Press ← again once Claude has read it.`
285 
286When Claude Code backgrounds the session, either after about ten seconds or after you press `←` again, it stops a shell command that Claude is still running in the foreground. Claude Code doesn't show the `Background this session?` dialog for that command. In the background session, Claude has no record that the command started, so Claude may run the command again. To keep the command running when the session moves, press `Ctrl+B` to [turn it into a background command](https://code.claude.com/docs/en/interactive-mode.md#background-bash-commands) while Claude Code is still waiting.
287 
288Pressing `←` creates the session's row even when the conversation has no messages yet, so `→` still returns to it.
289 
290You can turn this shortcut off for foreground sessions with the [`leftArrowOpensAgents`](https://code.claude.com/docs/en/settings-reference#leftarrowopensagents) setting in `/config`.
291 
292##### Prompts sent as the session moves to the background
293 
294If you enter a prompt or `!` shell command at the moment the session moves to the background, it is stopped or left unsent:
295 
296* **Sent as the conversation closes**: the response or command stops when the conversation closes and agent view opens
297* **Still waiting on [hooks](https://code.claude.com/docs/en/hooks.md) at that moment**: the prompt isn't sent, and nothing on screen says so. This includes a prompt you typed while [`SessionStart` hooks](https://code.claude.com/docs/en/hooks#sessionstart) were still running
298 
299In both cases the text you typed is kept in [prompt history](https://code.claude.com/docs/en/interactive-mode.md#command-history). To send it again, open the backgrounded session and press `↑` at its prompt to bring the text back.
300 
301280### Organize the list
302281 
303282Agent view groups sessions so the ones that need input are at the top, with `Ready for review` and `Needs input` above `Working` and `Completed`. These group names don't map one-to-one to the [states](#read-session-state) above: a session moves to `Ready for review` when it has an open pull request that needs review or has failing checks, and `Completed` collects finished, failed, and stopped sessions together.
from line 627
648627 
649628##### Resolve a `files that weren't checked against a repository` message
650629 
651This message from `claude rm` means files remain in a worktree directory that isn't inside any git repository or that a [`WorktreeCreate` hook](https://code.claude.com/docs/en/hooks#worktreecreate) manages. Copy out any files you want to keep, then take the step for your case:
630This message from `claude rm` means files remain in a worktree directory that isn't inside any git repository or that a [`WorktreeCreate` hook](https://code.claude.com/docs/en/hooks#worktreecreate) manages. Copy out any files you want to keep.
652631 
632The following table shows how to clear the directory with and without worktree hooks:
633 
653634| Your case | What to do |
654635| :- | :- |
655636| No `WorktreeCreate` hook manages the directory | To discard the files, press `Ctrl+X` twice on the session's row in agent view. Or remove the directory yourself, then run `claude rm <id>` again |
from line 907
926907* Within 48 hours, the session shows as failed. Attach or reply to it and it restarts from its saved conversation. To pick the interrupted work back up, send it a reply asking it to continue.
927908* Past 48 hours, such as after the machine was off for days, the session shows as stopped with `ended while the background service was off`.
928909 
929 Press `Enter` on the row and the footer shows `Press enter again to resume this session (it ended while the background service was off), or ctrl+x to remove it.` Press `Enter` on the same row again to resume its saved conversation. A reply, or `claude attach <id>`, resumes it without that footer prompt.
910 Press `Enter` on the row and the footer shows `Press Enter again to resume this session (it ended while the background service was off), or ctrl+x to remove it.` Press `Enter` on the same row again to resume its saved conversation. A reply, or `claude attach <id>`, resumes it without that footer prompt.
930911 
931912When [transcript cleanup](https://code.claude.com/docs/en/settings-reference.md#cleanupperioddays) has removed a stopped session's saved conversation, Claude Code refuses to open the row: the message says there is nothing to resume. `claude rm <id>` deletes the row, unless [Claude Code refuses](#what-deleting-a-session-removes), and `claude respawn <id>` runs its original prompt again. See [This session's saved conversation is no longer on disk](https://code.claude.com/docs/en/errors.md#this-sessions-saved-conversation-is-no-longer-on-disk).
932913 
from line 927
946927When you open a session that you [backgrounded from another conversation](#from-inside-a-session) and that stopped before it ran a turn of its own, Claude Code resumes that conversation. If Claude Code can't find the conversation, it refuses to open the session:
947928 
948929* `claude attach` prints `This session has no saved transcript`.
949* Agent view shows `Press enter again to restart this session fresh` below the list.
930* Agent view shows `Press Enter again to restart this session fresh` below the list.
950931 
951932Press `Enter` on the same row again to restart the session with an empty conversation, or run `claude respawn <id>` from the shell.
952933 
Feedback