We use TeamCity to run some UI automation. Since we upgraded to 5.1 (due to a TFS 2010 upgrade), I have noticed that we have been getting more failures than expected. I found that the TeamCity build agent window steals focus from the browser window being automated. Unfortunately, the browser window needs to retain focus for specific tests. I've found a workaround to make sure that the window has focus before the action is taken on it, but I wanted to let you guys know about this.
5.0 did not have this problem, so this looks to be a regression.