A former career U.S. diplomat said in court Thursday that he will plead guilty to charges of serving as a secret agent for communist Cuba going back decades, bringing a lightning fast resolution to a case prosecutors described as one of the most brazen betrayals in the history of the U.S. foreign service.