Skip to content

Glossary

Fork (of a conversation)

Last updated

Definition

A fork of a conversation is a new chat that starts with a copy of an existing chat's history, up to its latest message or an earlier one, so you can try another direction without changing the original.

Also called: branch a session, fork session, conversation branch.

Forking is useful when an agent has built up useful context and you want to try two approaches from the same point, or go back to before a wrong turn. The original conversation stays as it was.

ToolHow to fork
Claude Code/branch [name] inside a session, or claude --resume <id> --fork-session (also with --continue); the fork gets its own session ID
Codex CLIcodex fork <id> or codex fork --last
Codex app serverthread/fork, optionally copying only the turns up to a given turn

To move work to a different app instead, use a handoff.

In Pairbar

⋯ → Continue offers Fork from latest… (Claude continues the history in a new session with --fork-session and opens it in Claude; Codex uses a native draft copied through thread/fork; review and Send in Codex) and Fork from a message…, which lists the chat's replies newest first. Claude forks natively at the chosen reply with --resume-session-at; Codex uses thread/fork with lastTurnId to copy through the selected completed turn. Older transcripts without a trustworthy turn ID use a handoff through the reply; native fork errors do not fall back to latest. F is the shortcut while the chat menu is open. See Fork.

Frequently asked questions

Does forking a Claude Code session change the original?
No. The fork gets a new session ID and the original stays unchanged and resumable.
Can I fork from an earlier message, not just the end?
Yes. Claude forks at the chosen reply. Codex forks through its completed native turn when the transcript carries a trustworthy turn ID, otherwise Pairbar uses a handoff through the reply.
Do forks share files?
Yes, if they run in the same folder. Use a separate worktree if the two directions shouldn't touch each other's edits.