Diff/compare view baselines against repo default branch, not the branch selected at session start

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 27, 2026

When starting a session/worktree, the settings bar lets you pick a base branch (e.g. dev) and enable "worktree" mode. However, the "changes" comparison view (the file-diff panel shown for a session) diffs against the repository's default branch (master here, per origin/HEAD) instead of against the branch actually selected for the session (dev).

Repro:

  1. Start a session in a repo where the default branch (master) has diverged significantly from another long-lived branch (dev).
  2. In the session settings, select dev as the branch and enable worktree.
  3. Open the "changes" / compare view.

Expected: The diff baseline should be the branch selected at session start (dev → session branch), showing only what this session actually changed.

Actual: The diff view header shows master → <session-branch> and lists ~500 unrelated files — the full historical divergence between master and dev — even though the session itself has made zero commits yet (git diff dev...HEAD is empty).

This makes it look like the session produced hundreds of file changes when it produced none, which is misleading for review.

View original on GitHub ↗