Search the documentation
8 pages for --fork-session.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
Manage multiple agents with agent view
Claude Code CLI · in the page
agent-view
…it to the background, or a session started with `claude --resume <id> --fork-session`. Before this release, if you ran `/fork` in such a session before sending it a new prompt, Claude Code printed the…
Checkpointing
Claude Code CLI · in the page
checkpointing
…[`/branch`](/docs/en/sessions#branch-a-session) or `claude --continue --fork-session` instead. </Note> ## Common use cases Checkpoints are particularly useful when: * **Exploring alternatives**: tr…
CLI reference
Claude Code CLI · in the page
cli-reference
…ku` | | `--fork-session` | When resuming, create a new session ID instead of reusing the original (use with…
Glossary
Claude Code CLI · in the page
glossary
…ntext-window). Sessions can be resumed with `claude -c`, forked with `--fork-session` to preserve history under a new session ID, or run in parallel across terminals. Running `/clear` starts a new ses…
Hooks reference
Claude Code CLI · in the page
hooks
…on resume with `source` set to `"resume"`, or `"fork"` if you added `--fork-session`, so they can refresh their context. #### Decision control Not every event supports blocking or controlling behav…
How Claude Code works
Claude Code CLI · in the page
how-claude-code-works
…and appends new messages to the existing conversation. Forking with `--fork-session` or `/branch` copies the history into a new session ID, leaving the original unchanged. <img src="https://mintcdn.…
Manage sessions
Claude Code CLI · in the page
sessions
…ermission-mode` or `--dangerously-skip-permissions` * You don't pass `--fork-session` * The run isn't started through [channels](/docs/en/channels) ### Resume from a summary On a Pro or Max plan, wh…
Run parallel sessions with worktrees
Claude Code CLI · in the page
worktrees
…worktree add` declines, so launch those from the main checkout. * **`--fork-session`**: the forked session starts in the directory you launched Claude from, and Claude Code leaves the original sessio…