Iran's Supreme Leader left hospital this week facing a packed in-tray, with issues including the nuclear talks, Islamic State (IS) and the question of who will succeed him at the top of the pile. The three subjects are linked.
The authorities said that the 75-year-old Ayatollah Ali Khamenei was in "good health" following what they described as prostate surgery. However, rumours abound in Tehran that he is suffering from terminal cancer.
Iran is heading towards a geo-political crossroads and the question of succession will not wait. The 35-year-old Islamic Republic has only known two supreme leaders, both of whom were in the vanguard of the revolution which overthrew the Shah. The next will come from the younger generation - one that is split between hardliners, pragmatists and "liberals".
There is not much point in the Supreme Leader lining up the head of the Expediency Council - 80-year-old Ayatollah Ali Akbar Hashemi Rafsanjani - as his replacement, nor the 87-year-old head of the Guardian Council, Ayatollah Ahmad Jannati.
Instead, men such as Ayatollah Khomeini's grandson, Hassan Khomeini, former justice chief Ayatollah Mahmoud Shahroudi, and his successor, Mohammed-Sadegh Larijani, are in the frame. This will be the generation that inherits the Islamic Republic and whichever direction it goes over the next few months.
Ayatollah Khamenei has allowed his reformist president, Hassan Rouhani, to present a more open, pragmatic face to the outside world. That, and the interim nuclear deal reached last November are partially why Israeli murmurings about pre-emptive military strikes have quietened. But Rouhani's policies have been in the teeth of resistance from hard-right factions in Iran and may still be reversed.
The interim nuclear deal was supposed to become a comprehensive agreement deal in July. The deadline is now November 24, and this week talks resumed in New York on the sidelines of the UN General Assembly meeting.
However, British, US and Iranian sources all suggest that there is no air of optimism about the talks. The main sticking point remains Iran's "right" to enrich uranium and if such a right exists, then how much.
Where there is room for compromise is on the question of dealing with IS. Both the Americans and Iranians want to destroy IS in Iraq. However, the Iranians are fearful that if it is also smashed in Syria, the opposition forces there, currently fighting both IS and government troops, might then become strong enough to defeat Iran's ally, President Bashar al-Assad. The US is now hinting there is some room to co-operate on this. What the Iranians can try to deliver in return is a private agreement from Damascus that Syria's air defences will not be deployed against US war planes as long as they do not attack government targets.
US-Iran interests now overlap in Iraq, but conflict in Syria. A compromise could bring the degree of trust required to move the nuclear talks forward, which for both sides is a bigger prize in this year of uncertainty.