We've learned Robert "Joe" Halderman was arrested yesterday outside the CBS headquarters in NYC, and it was news to the people inside who make the news.

Our sources say the Manhattan D.A. played the investigation close to the vest and people inside the building were baffled when the highly-respected producer was cuffed and hauled off in the David Letterman extortion case.

As we already reported Halderman had a relationship with Stephanie Birkitt and lived with her. But we're told they had broken up "recently." We do not know who ended the relationship, but Halderman allegedly was in possession of Birkitt's diary, correspondence and photos -- which he says incriminated Letterman.

People connected with the network tell us Letterman did have a relationship with Birkitt, but the word is that it ended before Letterman had his baby in 2003.