Generally the system is referred to as the "permanent state". The oral and written tradition of various parts of the civil services has a very large influence on what policy can actually get made. Certain ideas keep popping up in a way that suggests the same briefing paper is simply being presented as a new idea to each new minister.
The secret part of the permanent state is even more persistent, as it keeps all information relating to its operations secret. This can include even quite large chunks of the budget: https://en.wikipedia.org/wiki/Zircon_affair
Pullquote from the end of that page: "We saw the spectacle of police being sent to raid the BBC headquarters in Glasgow in the middle of the night.... We saw the Zircon tapes seized as an elaborate blind." Darling said that the cabinet episode concerned "... the election campaign of 1983, and the fact that the Government sought to undermine and spy on the citizens of this country."
https://www.youtube.com/watch?v=0XBdCwWeYzo
Edit: I suspect the answer is "all of them, and some..."
We know what a state of emergency in the UK looks like, it looks like Northern Ireland during the Troubles.
Having worked with such people, I can confirm they still exist in the UK public sector and have only increased their power. They have an amazing ability to see a cloud in every silver lining. They detest any simple solution to anything.
When you come to work at a government agency, you learn the tasks and procedures. For the most part, those tasks and procedures carry on regardless of who's in the legislature. Sometimes things do change because of legislation, but mostly policies and practices that were developed inside the bureaucrat's building continue on. Employees come and go, but the manual lives on.
In the case of spy agencies it's even worse, because the legislators have almost no idea what the tasks, policies and procedures are, other than the top veneer that spies choose to share with their overseers. They were truly developed in a vacuum of oversite.
That's a really interesting perspective. Like an algorythm with a relative threat detection system as opposed to a fixed threat level. So when a major threat disappears, the next largest threat is in its sights. What happens when the next relative threat is a guy buying some drugs from a dealer? The manual is SkyNet for wetware.