Skip to main content
reopt Handbook
reopt Handbook
Claude Code Command MasterLabels and command selectionHow to read a detail guideComplete command listTerminal CLI Commands and Flags

Task guides

Core command basicsStarting and resuming workSkills and Custom CommandsAutomation and Web CommandsOperations and Safety CommandsCustom commands and skillsMCP connections and commands

Conversation and context

Cmd. /add-dirCmd. /backgroundCmd. /compactCmd. /contextCmd. /copyCmd. /exportCmd. /forkCmd. /importCmd. /initCmd. /memoryCmd. /recapCmd. /renameCmd. /resumeCmd. /rewindCmd. claude purge

Planning and execution

Cmd. /autofix-prCmd. /batchCmd. /desktopCmd. /goalCmd. /loopCmd. /planCmd. /remote-envCmd. /scheduleCmd. /tasksCmd. /teleportCmd. /workflows

Review and verification

Cmd. /code-reviewCmd. /runCmd. /run-skill-generatorCmd. /security-reviewCmd. /simplifyCmd. /verify

Models and settings

Cmd. /claude-apiCmd. /configCmd. /effortCmd. /fastCmd. /modelCmd. /output-styleCmd. /update-config

Permissions and integrations

Cmd. /agentsCmd. /hooksCmd. /ideCmd. /mcpCmd. /permissionsCmd. /pluginCmd. /reload-pluginsCmd. /reload-skillsCmd. /sandboxCmd. /skillsCmd. /web-setup

Status and diagnostics

Cmd. /debugCmd. /diffCmd. /doctorCmd. /fewer-permission-promptsCmd. /release-notesCmd. /team-onboarding

Display and input

Cmd. /colorCmd. /focusCmd. /keybindingsCmd. /powerupCmd. /statuslineCmd. /terminal-setupCmd. /themeCmd. /tui

Account and usage

Cmd. /upgradeCmd. /usageCmd. /usage-credits

Legacy

Cmd. /costCmd. /pr-commentsCmd. /reviewCmd. /statsCmd. /ultrareviewCmd. /vimCmd. /approved-toolsCmd. /commandsCmd. /extra-usageCmd. /settingsCmd. /tagCmd. /todos

Verification and history

Current verification scopeHandbook updatesRelease coverage historyEarlier verification recordsCommand change history
Handbook›Claude Code Command Master›Cmd. /background
한국어KOEnglishEN

Cmd. /background

Detach the current session as a background agent (/bg).

Written and reviewed by Eric Han · Co-founder & CTO, reopt

Key takeaways

  • Detach the current session as a background agent (/bg).
  • Check the input surface and availability before using the examples below.

Purpose

Detach the current session as a background agent (/bg).

/background [prompt]

Availability

FieldValue
Input surfaceRunning CLI prompt
KindBuilt-in
StatusCurrent reference
Aliases/bg
Documented minimumNot specified
Reviewed against2026-10-23 · Claude Code 2.1.308

The installed command menu and account or organization settings determine availability.

Examples

/background

Effects and persistence

The session keeps running in the background and releases the terminal. Monitor it with claude agents.

Cautions

Detaching keeps work running. Use Agent View to inspect it; leaving the terminal does not stop the agent. Replies sent from claude agents arrive as queued messages from v2.1.287, and slash commands other than /stop sent during a turn run when it ends; from v2.1.290, /model, /effort, and /rename apply right away instead. From v2.1.295, Ctrl+C at the idle prompt of an attached background session leaves a pending /loop wakeup alone: pressing it twice detaches and the loop keeps running, and Esc stops the loop. When you background a session with ← on an empty prompt, a turn or ! command started while the session moves is stopped instead of finishing out of sight from v2.1.296, and stopping the turn while ← waits for the current tool shows "Backgrounding cancelled" (v2.1.295).

Official sources

  • Commands
  • Agent View

Complete command list · Verification scope

Related docs

Cmd. /tasks

Manage current-session background work (/bashes).

Cmd. /resume

Resume by ID, name, or picker (/continue).

Multi-session Workflow

Claude Code Complete Guide · Run parallel Claude Code sessions with git worktrees and agent view without losing branch, context, or verification control.

Subagents

Claude Code Complete Guide · Delegate bounded work while keeping the main Claude Code session accountable.

Complete command list

Codex Command Master · Every Codex CLI slash command on one page: syntax, kind, and availability for all 57 official rows, plus examples, effects, and cautions by category.

Cmd. /add-dir

Add a working directory for file access in this session.

Cmd. /compact

Summarize the current conversation to free context.

On this page

PurposeAvailabilityExamplesEffects and persistenceCautionsOfficial sources