The problem
Agent chats often reach a fork in the road. The agent has mapped the bug and proposed two fixes; you want to try both. Or ten replies ago it had the right idea, then wandered off into a refactor you didn't ask for. Continuing in the same chat means piling corrections on top of a history that already points the wrong way.
Starting a fresh chat throws away the context the agent built up, and you pay again, in time and plan usage, to rebuild it.
How Pairbar solves it
- Open the chat's menuClick ⋯ on the row or right-click it, then Continue ›. With the menu open, F goes straight to forking.
- Pick where to branchFork from latest… keeps the whole conversation. Fork from a message… lists the chat's replies, newest first; pick the one you want to branch from.
- Say what the fork should doFor example: "Try the second approach instead: fix it in the serializer, not the controller." This becomes the fork's first instruction.
- Work in the new chatThe fork opens in its app as a separate chat. The original stays exactly as it was, so you can compare the two.
How each fork is made
| Claude | Codex | |
|---|---|---|
| Fork from latest | continues the same history in a new session (--fork-session) and opens it in Claude | a native draft copied through thread/fork; review and Send in Codex |
| Fork from a message | forks natively at that reply (--resume-session-at) | forks through the selected completed native turn (thread/fork with lastTurnId); uses a handoff when the transcript has no trustworthy turn ID |
Forks run through the official command-line tools, so they need claude or codex installed and logged in. If one fails, the notice under the search field has Details with the tool's full output.
Fork or hand off?
- Fork keeps you in the same app and branches the conversation.
- Hand off (also under Continue, key H) moves the work to the other app, with the conversation and the repo's state in a handoff file. See hand off between Claude and Codex.
Cloud chats have no transcript on your Mac, so they can't be forked from Pairbar.
Without Pairbar
You can branch conversations without Pairbar:
- Claude Code CLI: resume a session with
--resume(or--continue) plus--fork-sessionto get a new session ID with the same history. - Claude Code's rewind: press Esc twice in a session to go back to an earlier message and edit it. This changes the direction of the current session rather than keeping both.
- Codex CLI:
codex resumereopens an earlier thread; check OpenAI's docs for its current fork options. - Copy and paste: start a new chat and paste in the key parts of the old one by hand.
# Fork a Claude Code session by hand (in the project folder)
claude --resume <session-id> --fork-session "Try the serializer fix instead"Frequently asked questions
- Does forking change the original chat?
- No. The fork is a new chat; the original keeps its history and stays in the list as before.
- Can I fork from an earlier reply, not just the latest?
- Yes. Fork from a message lists the chat's replies newest first. Claude forks natively at the reply you pick; Codex forks through that completed native turn when its ID is available. Older transcripts without that ID use a handoff through the reply. A rejected native fork shows an error rather than forking from latest.
- What do I need installed to fork?
- The official command-line tool for that app:
claudefor Claude chats,codexfor Codex chats, logged in with your account. - What's the difference between a fork and a handoff?
- A fork branches the conversation within the same app. A handoff moves the work to the other app, carrying the conversation and the repo's current state in a file.
Related
- DocsWorking across chatsHandoff, fork from a message, sending a message without opening a chat
- Use caseHand off a coding task from Claude Code to Codex (and back)Hand a chat to the other app with its whole conversation and repo state, in a private handoff file the new chat reads first.
- GlossaryFork (of a conversation)Starting a new chat from a copy of an existing chat's history, up to its latest or an earlier message, leaving the original unchanged.
- Use caseStart a Claude Code or Codex chat on a new branch in its own git worktreePairbar's composer starts a chat in any repo, on any branch or in a new worktree, with model, effort, mode, agent and local or cloud set up front.
- GuideInstall the claude, codex and gh command-line tools for PairbarWhat `claude`, `codex` and `gh` unlock in Pairbar, and how to install, sign in and check each tool on macOS.
Try Pairbar free for 7 days
One sidebar for the Claude and Codex desktop apps. Everything on for 7 days, no card needed; then $49/year ($39 first year with LAUNCH), $9/month or $129 lifetime (first 200 buyers). macOS 26 or later, Apple silicon.