Some American officials fear the president may have undercut his own leverage by repeating that he does not want a conflict with Iran — deliberate or accidental — as the 2020 election approaches. And Mr. Trump has recently distanced himself from the White House national security adviser, John R. Bolton, who publicly advocated regime change for years before joining the administration.

But Mr. Trump has also shown little interest in setting up a real diplomatic process to begin talks with Iranian leaders, the officials said, including resisting the kind of secret, back-channel discussions that President Barack Obama started several years before broad negotiations began.

In short, Mr. Trump neither avidly supports engaging Iran nor wants to be so confrontational to provoke Tehran into lashing out. Administration officials insist this middling course has worked — at least so far.