It depends solely on how the rest of the world -- most notably Russia -- views the first real move. Apparently killing off a general isn't quite there yet, who knew?
Iran has pretty good relations with Russia and China, but probably not enough that if, say, Iran sent planes and soldiers to attack the US mainland without asking first, for them to get in on that action. Which is part of the reason Iran won't do that.
Far end of the spectrum, if we wake up tomorrow to the news of "Trump bombs every Iran oil field in the country and kills thousands of civilians doing so" not only would Russia and China respond in earnest, likely so would a few other countries, but most importantly every ally we have would stay out of it. We still have...um...tepid relations with the UK, France and Germany, but not enough for them to sign up on that.
The best way for this to end is if the violence just flat-out ended, but I'm not sure that's realistic either.
Failing that, the escalation we've seen here could easily continue, with each step of the way being effectively handwaved as not much worse than the last one, nobody jumps in, and Iran uses proxies to harass US interests in the area and the US slapping any Iran military that dares leave its borders. Headline-grabbing deaths of innocents that go on for months, but never leading to rank-and-file boots on the ground style invasion. I believe this is the most likely result of the current setup, but doesn't really answer your question.
My real concern are the US soldiers duct-taped to Saudi oil fields. If the Iranians hit them, Trump will yell "Bigly!" and declare
war National Security Lol and send everything he can afford to the region, leading to yet another US incursion that lasts for 3 years or so.
Unless US forces push into Iran, in which case, @
Nelinrah is probably right.