The friction escalated in recent days after Mr. Cobb was overheard by a reporter for The New York Times discussing the dispute during a lunchtime conversation at a popular Washington steakhouse. Mr. Cobb was heard talking about a White House lawyer he deemed “a McGahn spy” and saying Mr. McGahn had “a couple documents locked in a safe” that he seemed to suggest he wanted access to. He also mentioned a colleague whom he blamed for “some of these earlier leaks,” and who he said “tried to push Jared out,” meaning Jared Kushner, the president’s son-in-law and senior adviser, who has been a previous source of dispute for the legal team.

After The Times contacted the White House about the situation, Mr. McGahn privately erupted at Mr. Cobb, according to people informed about the confrontation who asked not to be named describing internal matters. John F. Kelly, the White House chief of staff, sharply reprimanded Mr. Cobb for his indiscretion, the people said.