{"name":"\/fork","slug":"fork","family":"slash","title":"Slash commands","noun":"slash command","description":"[Copy the current conversation](\/docs\/en\/agent-view#copy-the-session-with-%2Ffork) into a new background session and keep working here. Pass a prompt and the copy starts working on it immediately; without one it waits in agent view for its first prompt. Except when the copy [edits in place](\/docs\/en\/agent-view#how-file-edits-are-isolated), Claude Code instructs it to create a worktree of its own before making code changes; the isolation instruction requires Claude Code v2.1.221 or later. To hand a side task to a subagent whose result comes back into this conversation, use `\/subtask`; to switch into a copy yourself, use `\/branch`. Requires Claude Code v2.1.212 or later; on v2.1.161 through v2.1.211, and whenever [agent view is turned off](\/docs\/en\/agent-view#turn-off-agent-view), `\/fork` starts a [forked subagent](\/docs\/en\/sub-agents#fork-the-current-conversation) instead","description_source":"docs","described_by":{"doc":"claude-code\/commands","title":"Commands"},"presence":{"first_seen":null,"removed_in":null,"in_current_build":false,"newest_mined":"2.1.295","builds":0,"mined_builds":138,"first_cited":null},"aliases":[],"entries":[{"version":"2.1.292","anchor":"fork-from-a-repo-less-session-records-a-repository-url","heading":"\/fork can send a repository address when no git address is found","line":"When forking a session finds no git repository address, Claude Code now falls back to another repository address","released_at":"2026-10-06 17:10:31","reason":"named in this entry, found in this entry's text"},{"version":"2.1.212","anchor":"fork-command","heading":"\/fork Command","line":null,"released_at":"2026-07-16 19:20:24","reason":"found in this entry's text"},{"version":"2.1.212","anchor":"fork-session-safety-checks","heading":"Fork Session Safety Checks","line":null,"released_at":"2026-07-16 19:20:24","reason":"found in this entry's text"},{"version":"2.1.212","anchor":"claude-code-simple-environment-variable","heading":"CLAUDE_CODE_SIMPLE Environment Variable","line":null,"released_at":"2026-07-16 19:20:24","reason":"found in this entry's text"},{"version":"2.1.117","anchor":"fork-command","heading":"\/fork Command","line":null,"released_at":"2026-04-21 21:54:08","reason":"found in this entry's text"},{"version":"2.1.117","anchor":"fork-subagent-feature-gate-gradual-rollout","heading":"Fork Subagent Feature Gate [Gradual Rollout]","line":null,"released_at":"2026-04-21 21:54:08","reason":"found in this entry's text"},{"version":"2.1.77","anchor":"branch-command-renamed-from-fork","heading":"\/branch Command (renamed from \/fork )","line":null,"released_at":"2026-03-16 22:16:52","reason":"found in this entry's text"},{"version":"2.1.8","anchor":"fork-command","heading":"\/fork Command","line":null,"released_at":"2026-01-15 00:41:01","reason":"found in this entry's text"}],"entries_total":8,"docs":[{"source":"claude-code","path":"commands","title":"Commands","documented":true},{"source":"claude-code","path":"agent-view","title":"Manage multiple agents with agent view","documented":false},{"source":"claude-code","path":"agents","title":"Run agents in parallel","documented":false},{"source":"claude-code","path":"hooks","title":"Hooks reference","documented":false},{"source":"claude-code","path":"prompt-caching","title":"How Claude Code uses prompt caching","documented":false},{"source":"claude-code","path":"sub-agents","title":"Create custom subagents","documented":false},{"source":"claude-code","path":"whats-new\/2026-w29","title":"Week 29 \u00b7 July 13\u201317, 2026","documented":false},{"source":"claude-code","path":"whats-new\/2026-w32","title":"Week 32 \u00b7 August 3\u20137, 2026","documented":false},{"source":"claude-code","path":"whats-new\/index","title":"What's new","documented":false},{"source":"mcp","path":"community\/sep-guidelines","title":"SEP Guidelines","documented":false}],"docs_total":10,"gates":[],"related":[],"url":"https:\/\/changelogs.core-directive.com\/reference\/slash\/fork","family_url":"https:\/\/changelogs.core-directive.com\/reference\/slash.json"}