Skip to content

Branches

Listing branches

/branch

Shows all branches in the current repository, with a checkmark next to the active one. Click any branch to switch to it.

Switching branches

Via list

Click a branch name in the /branch list to check it out and restart the session.

Directly

/branch <name>

Checks out the branch immediately without showing the list.

How it works

Branch state is persisted per-repo using a .active_branch file:

sessions/<chat_id>/<workspace>/<repo>/.active_branch

When you switch branches, the bot:

  1. Runs git checkout <branch>
  2. Updates the .active_branch file
  3. Restarts the Claude session in the new branch

If the branch doesn’t exist locally, git checkout will attempt to create it from the remote (git checkout -b <branch> --track origin/<branch>).