Some have dismissed the public dance between Barr and Trump as Kabuki theater — but the attorney general’s allies insist Barr’s patience is not infinite.

What is William Barr’s red line?

It’s the question flying around the Justice Department and the legal world as the attorney general is locked in a tense standoff with Donald Trump, who is defying Barr’s public plea last week that the president stop his high-profile punditry about pending criminal cases.

Trump has refused to cease his incessant commentary about the ongoing prosecutions of his former aide Michael Flynn and longtime adviser Roger Stone. After discussing both on Tuesday, Trump indulged his hardcore Twitter habit again Wednesday with a series of retweets painting him and his supporters as beleaguered by the so-called deep state. Trump then retweeted video clips directly criticizing Barr for admonishing him to pipe down.

In response, Barr has said … well … nothing — at least in public.

But rumblings of the attorney general’s unease have grown over the past couple of days, with news reports saying Barr has mentioned to associates that he might resign if Trump keeps up the drumbeat of commentary on DOJ business.

Such a threat was implicit in Barr’s televised ABC interview last week in which he said it was “impossible” for him to do his job amid a constant flurry of Trump’s tweets.

“I cannot do my job here at the department with a constant background commentary that undercuts me,” Barr said.

So what might actually drive Barr to quit?

People close to Barr said the attorney general has been frustrated with Trump’s statements for months, telling the president to rein them in and enlisting White House counsel Pat Cipollone and others to reinforce the message. Barr’s patience is not infinite, the attorney’s general’s associates emphasized, without specifying just what he would do in response. Still, they insisted the DOJ chief is not on the verge of quitting — yet.