Skip to content

Use case

Fork a Claude Code or Codex conversation from any reply

Pairbar is a macOS app that adds a fork command to every Claude Code and Codex chat in its sidebar. Choose Continue › Fork from latest… or Fork from a message…, say what the fork should do, and Pairbar starts a new chat that shares the original's history up to that point, leaving the original untouched.

Last updated

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

  1. Open the chat's menu
    Click ⋯ on the row or right-click it, then Continue ›. With the menu open, F goes straight to forking.
  2. Pick where to branch
    Fork 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.
  3. Say what the fork should do
    For example: "Try the second approach instead: fix it in the serializer, not the controller." This becomes the fork's first instruction.
  4. Work in the new chat
    The 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

ClaudeCodex
Fork from latestcontinues the same history in a new session (--fork-session) and opens it in Claudea native draft copied through thread/fork; review and Send in Codex
Fork from a messageforks 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-session to 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 resume reopens 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: claude for Claude chats, codex for 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.

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.