[2] Castex served for twelve years as mayor of the small town of Prades prior to his appointment as prime minister by President Emmanuel Macron.
Elected in 2008 as the mayor of Prades, Pyrénées-Orientales,[5] Castex served under Health Minister Xavier Bertrand as chief of staff in François Fillon's ministry from 2010 until 2011.
[9][10] Following Édouard Philippe's resignation on 3 July 2020, Castex was appointed Prime Minister by President Emmanuel Macron.
[13][14] On 25 April 2022, following Macron's re-election as President, Castex agreed to resign as prime minister.
[22] He is also friends with the ex-trades union leader Jean-Claude Mailly and the physician Patrick Pelloux, a former columnist at Charlie Hebdo.