But the president’s mind seems made up. “Look, I have a lot of respect for Rex and his people, good relationship,” he said of Mr. Tillerson. “It’s easier to say they comply. It’s a lot easier. But it’s the wrong thing. They don’t comply.”

Even longtime critics of the deal in Congress have their doubts about the wisdom of abandoning it. In an interview this week with David Ignatius of The Washington Post, the chairman of the Senate Foreign Relations Committee, Bob Corker, Republican of Tennessee, strongly suggested that this is not the moment to abandon something that is largely working.

“What I say to the president, and this is what Tillerson, Mattis and McMaster say,” said Mr. Corker, referring to Defense Secretary Jim Mattis and the national security adviser, Lt. Gen. H. R. McMaster, is that “you can only tear the agreement up one time.”

Right now, he added, “it’s not like a nuclear weapon is getting ready to be developed.”

Absent any urgency, he argued for a more nuanced approach. “Radically enforce it,” he said of the deal, demanding access to “various facilities in Iran.”

“If they don’t let us in,” Mr. Corker said, “boom.”

He added: “You want the breakup of this deal to be about Iran. You don’t want it to be about the U.S., because we want our allies with us.” Mr. Tillerson, he said, ultimately wanted to renegotiate a deal that would stop Iran from enriching uranium forever — a concession it is hard to imagine Iran ever making.

Some version of Mr. Corker’s “radical enforcement” is essentially the strategy that national security officials have described in recent days. They deny they are trying to provoke the Iranians. Instead, they say they are testing the utility of the accord so they can report back to Mr. Trump about whether Iran’s interpretation of the provisions of the agreement, and its separate commitments to the International Atomic Energy Agency, would pave the way for international inspectors to go anywhere in the country.

That probably sets the stage for some kind of standoff.

Iran has long said that its most sensitive military locations are off limits. That issue came to a head in 2015 when international inspectors demanded access to Parchin, a military base near Tehran where there was evidence of past nuclear work. A compromise was worked out in which Iran took environmental samples itself, under surveillance by agency inspectors. The inspectors found little, but the precedent of how the inspection was carried out was cited by critics of the deal as evidence that the Iranians could hide work on uranium enrichment or other technology in off-limits military facilities.