CIA can't operate in the U.S.

…at least they aren’t supposed to.

Is there an exception for investigating foreigners with diplomatic immunity? It seems reasonable that there would be given the special rules that the diplomats get to play under.

Is there another agency within the US that carries out covert operations? The FBI?

I’m thinking of a comparable organisation to the UK’s MI5, which carries out work within the UK to combat terrorism etc, whereas MI6carries out operations overseas, like the CIA.

MI5 differs in one big respect to the FBI, they don’t have the power to arrest or detain. So they have to work with either the local police force or with one of the specialist operations units of Scotland Yard (the Met), such as SO15 the Counter-Terrorism Command(which took over the role of Special Branch and the Anti-Terrorism Branch).

In the past Special Branch was responsible for arresting spies and moles, but they worked with MI5 in ferreting them out, now that role would fall on a combination of MI5 and SO15.

The CIA does operate within the US. They used to do quite a lot of spying on domestic groups and other bad things that came out under the Church Committee which resulted in the Foreign Intelligence Surveillance Act which dictated what the CIA could and could not do within the US. It pretty much had to be related to international matters, nothing purely domestic. I.e., they could wiretap, follow suspected foreign agents in the US, even if they were US citizens.

The act has been watered down a lot over the years, especially with the Patriot Act and the Protect America Act. (Ugh, it makes me shiver just typing those names.) So it’s even easier for the CIA to do things like in the pre-Church days.

This is called “intelligence oversight.” Back in the day, the CIA, DOD, FBI, etc all spied on American citizens for no apparent reason. They basically did whatever they wanted to. This led to a number of reforms that limited their power to spy on American citizens without cause.

The assumption is that anyone in the US is a citizen until proven otherwise. Anything a US citizen does wrong is a criminal law enforcement matter. Since the FBI is the federal law enforcement agency, they are presumed to have primary jurisdiction over US investigations.

Other agencies are only permitted to operate in the US under certain conditions, which basically amount to proving they are doing legitimate work involving a foreign threat and not just spying on US citizens for giggles.

What about the ATF, DEA, Secret Service, US Marshals and Postal Inspectors?

They are all Federal LE agencies aren’t they?

They are, and they are authorized by statute to engage in domestic criminal investigations in their specific areas of specialty. The FBI retains criminal jurisdiction in all other matters of federal criminal law, and is the default leader of multi-agency task forces in cases where there is overlap.