I used to rebase every feature branch onto main before merging. Linear history, clean log, no merge commits. Then I started letting coding agents work on branches, and I changed my mind.
The reason is undo. When an agent does something I don't want, I want to take back that one turn and keep everything before it. So the app I build (Styx) snapshots the branch after every agent turn, as a hidden git ref that points at a commit.
A rebase rewrites every commit on the branch. The snapshots still point at the old commits, which are no longer on the branch's history. "Undo the last turn" would jump to a commit that has nothing to do with the branch you now have.
A merge doesn't rewrite anything. Main comes in as one new commit on top, the snapshots stay on the branch's history, and undo keeps working. The price is a merge commit in the log, which I've stopped minding.
The general lesson: if anything outside git points at your commits (snapshots, review comments, deploy records), rewriting history breaks it quietly. Do you rebase branches that tools or agents work on, or have you hit the same thing?