WASHINGTON  As a bipartisan group of Congressional tax writers opened widely watched negotiations last Wednesday over what to do about expiring tax cuts, a secret set of tax talks was taking place just steps off the Senate floor.

Senator Mitch McConnell of Kentucky and a single staff member had slipped into the ceremonial office of Vice President Joseph R. Biden Jr. to try to hash out a compromise directly with the vice president, who was accompanied by a top aide of his own, Ron Klain, his chief of staff.

The meeting was one of a number of direct conversations over the next few days between Mr. Biden and Mr. McConnell, the Senate Republican leader and a Senate colleague of Mr. Biden’s for nearly 25 years, that ultimately led to the agreement reached Monday. It was a bipartisan bargain that  in a startling departure from the past two years in the capital  ended with Republicans praising it and Democrats claiming they were blindsided and undercut.

According to those knowledgeable about the events that played out over less than a week, the agreement was the product of a fast-paced series of telephone contacts, conference calls and consultations with Congressional leaders. A critical negotiation on Sunday led to a surprise cut in employee payroll taxes as the men sought to wrap up the deal.