Mirasim Documentation

Chapter 06

Branches, reruns and worktrees

Fork a conversation, re-run or rewind a turn, and run parallel sessions in separate Git worktrees.

Forking a conversation

Any reply in a transcript can start a new branch. The branch inherits the history up to that point, and the prompt you write becomes its first turn.

  1. Choose where to branch

    At the end of the reply right before the point you want to change, open ⋯ and choose "New session from here".

  2. Write the branch's first prompt

    The branch is a separate session. The original keeps running and keeps its history.

  3. Compare, then keep one

    The branch shows which session and turn it came from, and the parent lists its branches. Delete the one you do not keep.

Re-running and rewinding turns

"Re-run", in the ⋯ menu at the end of a reply, asks the same question again with that turn's own agent, model and reasoning level. Re-running an earlier turn drops the turns after it; the menu item says so.

To change a message you sent, choose "Rewind" on it and pick whether to restore the conversation, the code, or both to before that message. The message goes back into the composer, where you can edit it and send it again. "Put in composer" fills the composer with a message without changing the conversation.

Worktrees: parallel agents on one repository

A session can run in its own Git worktree: a separate checkout on its own branch, so parallel agents in one repository do not edit the same files.

git status, git diff and your own editor work as usual. Merging a session's work back is an ordinary merge; discarding it is an ordinary branch delete.

  1. Turn on worktree in the composer

    It sits beside the workspace and branch pickers. When you send, a new git worktree is created with an automatic name and the session runs in it.

  2. Pick the base branch

    The agent switches to it first; with worktree on, the new worktree is branched off it.

  3. Remove the worktree when you delete the session

    Deleting a session offers to remove its worktree too. Git refuses while uncommitted changes remain; commit or discard them first.

Something wrong or missing on this page? Tell us