background-sessions
The tracked changes tagged background-sessions, newest release first. Every sentence is an item's summary.
Goes with
Changes
Claude Code v2.1.326
-
Sessions with --bare on an unapproved API key refuse most background moves, and claude --bare --bg exits with an error if the background service lacks the key.
-
--add-dir and /add-dir in local terminal sessions show a trust prompt for untrusted folders, and claude --bg refuses such folders.
-
--await-initialize is refused with --bg or --worktree --tmux.
-
Agent view Ctrl+C twice, Ctrl+D twice or /exit after pressing left arrow in an empty conversation now ends that session instead of leaving it running for 5 minutes.
-
Background sessions now stop before any model request when the LLM gateway exported by the shell is lost after a crash, reopen from another folder, or is missing from the background service.
+2 more
-
The background service no longer ends the user's own processes when a reused process number belonged to another user's process.
-
A background session is no longer killed and its request lost when the older session it had resumed is opened, stopped or removed.
Claude Code v2.1.325
-
Fixed background sessions started on a claude.ai login using and billing an API key or token from the shell that started the background service.
-
Improved the messages shown when a background session cannot use its session's API key or token; they no longer suggest adding the key to settings.
Claude Code v2.1.314
-
Fixed background sessions that fail to start being reported as a deleted daemon binary when the binary is still on disk.
Claude Code v2.1.311
-
Fixed a background session that crashed between turns not being restarted while attached, pinned, or having a scheduled task or wake-up set.
-
Fixed the background service error suggesting the disabled claude daemon restart command; it now suggests claude daemon stop --any and states that it ends background sessions.
-
Fixed claude respawn with an id starting the background service before reporting that no background session matches the id.
-
Fixed status line links staying plain text in background sessions after opening them from a terminal that supports links.
-
Improved messages shown when a background session's process exits: they no longer promise a restart that is not coming and say how to resume the session.
Claude Code v2.1.299
-
Fixed bare mode notices in background sessions telling users to restart without --bare; they now name /stop and claude --resume like safe mode notices.
bare-modebackground-sessions -
Fixed background sessions started with --safe-mode silently leaving safe mode when the session was woken or restarted.
background-sessionssafe-mode -
Fixed claude mcp add <name> -- <command> --background being started as a background session.
-
Fixed a prompt or reply to a --bg or --background background session being taken for the flag, which could start new sessions repeatedly.
Claude Code v2.1.296
-
Fixed a prompt sent just after the background shortcut being run twice, once unseen in the foreground, when the background service was slow to answer.
-
Fixed a prompt sent while SessionStart hooks were still running vanishing when the session moved to the background; it is still not sent, but the up arrow now brings it back.
-
Changed the behavior so a turn or ! command started while the session moves to the background with the left arrow is now stopped instead of finishing out of sight.
Claude Code v2.1.295
-
Changed claude agents stopped with its background service so running sessions stop in about a minute unless it is run again, with a notice.
-
Fixed commands and hooks in background sessions inheriting FORCE_COLOR=3, which put color escape codes into output Claude reads.
-
Fixed claude agents starting a new background service as the old one exited when both were stopped with a session open.
-
Fixed a background session's /loop stopping silently when its wakeup came due while the process was down; the session now says so and Claude is told.
-
Fixed macOS background sessions restarting after an update sometimes running outside the stable app wrapper, so folder-access prompts could reappear.
+1 more
-
Changed Ctrl+C at the idle prompt of an attached background session to leave a pending /loop wakeup alone; press Esc to stop it.
Claude Code v2.1.285
-
Fixed a reply sent from claude agents to a background session waiting on a permission prompt sometimes approving the pending command.
-
Fixed claude attach, logs, stop, respawn and rm starting a new session with the command name as prompt when options came before it.
-
/resume and claude --resume now open a session running in the background instead of refusing, and a prompt given with claude --resume <id> "prompt" is sent as its next turn.