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. /fork
한국어KOEnglishEN

Cmd. /fork

Copy the conversation into a new background session.

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

Key takeaways

  • Copy the conversation into a new background session.
  • Check the input surface and availability before using the examples below.

Purpose

Copy the conversation into a new background session.

/fork [prompt]
/branch [name]
/subtask <task>

Availability

FieldValue
Input surfaceRunning CLI prompt
KindBuilt-in
StatusCurrent reference
Aliases—
Documented minimumv2.1.212
Reviewed against2026-10-23 · Claude Code 2.1.308

This guide describes Agent View behavior in v2.1.212+. With Agent View disabled, /subtask is unavailable and /fork retains the inherited-context subagent behavior.

Examples

/fork Investigate the flaky integration test in isolation

Effects and persistence

/branch switches into a conversation branch; /fork creates a separate background session; /subtask returns its result to this conversation.

Choose where the result goes

CommandResult
/branch experimentSwitches into a new conversation branch; preserves the original
/fork investigate the failing testStarts a separate background session while this conversation continues
/subtask inspect parser edge casesRuns an inherited-context subagent and returns its result here

Cautions

Branches and forks copy a point in the conversation; later messages are not synchronized automatically. Branch-local temporary approvals do not carry over.

Official sources

  • Commands
  • Sub Agents
  • Agent View
  • Changelog

Complete command list · Verification scope

Related docs

Cmd. /export

Copy or save the current conversation as plain text.

Cmd. /resume

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

Subagents

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

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.

Cmd. /archive

Codex Command Master · Archive a completed or abandoned Codex session.

Cmd. /export

Copy or save the current conversation as plain text.

Cmd. /import

Import Codex, Gemini CLI, and Cursor configuration into Claude Code

On this page

PurposeAvailabilityExamplesEffects and persistenceChoose where the result goesCautionsOfficial sources