Khamenei could also be planning for his own succession, as removing the post of president would have an impact on Iran’s next supreme leader as well. It’s possible that he has already decided that his son Mojtaba should take over, or that another, weaker, figure should replace him with the Islamic Revolutionary Guards Corp (IRGC) manning the political levers of the country.