Oh I'm sorry, this is Teamcity, not Bamboo. Teamcity Version is 2022.10 (build 116751).
I tested "Exclude default branch changes from other branches". It does not change anything regarding this error.
The build already is a manual build. We don't have any triggers in this test case. It's just starting a new build with the given branch with the "run" button in Teamcity.
But to make sure I increased the maximum polling time to prevent polling to interfere, which does not change anything. The "collect changes" is part of the build pre steps in teamcity which we have no direct control of (as far as I know, except for the settings regarding included branches, etc.).
Maybe no one is starting builds from main branch? We hat this requirement multiple times in our project, but as this is working with sub branches from the given changesets it is just a matter of some more steps before building.
But for automated builds like nightlies it would be create to build from the main branch as well.