It happens much less frequent if you keep diplomat on a rival, but the problem is more than often I got hit by a nation that's not my rival. AI just keeps spamming everyone around with espionage. I don't have enough diplomats or hindsight to counter this.
This actually. I don't know who is building spy networks inside my country and I can't do anything to prevent it. Counterespionage sometimes is still not enough. If you are close to HRE with many OPMs and every one has few diplomats - you will have these effects all the time. Size of country should affect spy efficiency and building spy networks should cost money like missionary does. You want to have 100 spy network against Russia? Well, good luck! They have problems to control such big country themselves, but I'm sure that Dagestan or Georgia have enough resources to build underground headquarters in every Russian province. It's only like 1000+ development.
Actually I think espionage should be MUCH more painful. These things should hurt really badly, but they should not be easy to use against someone. Right now it's no brainer - send diplomat, oh he got caught. Who cares, I will just send him again. Spy network should be harder to get and should not decay so easily - still, espionage actions should be more painful. Diplomat building spy network should cost money. Actually lots of it, as he needs to bribe many, many people. The more development country has, the longer will spy network take to be made. Let's say that up to 30% it should be pretty fast (so claim fabrication does not take too long), but up to 100% infiltration? It should take YEARS to get so much in big country. Years of time and hundreds of ducats. But things that you can unleash at 100% infiltration should be pretty spectacular. Killing heir or ruler should be one of it, or +10 unrest for 5 years. Not petty sow discontent with +2 which actually does nothing to blobs. I played as Russia and with PA at 100% they couldn't do anything to destabilize me. Or some stronger nuke - cultural tensions. Spy action that targets one specific culture that is not native culture of country. You pay some gold and stuff, but they instantly (or within a 1-2 years) revolt to gain independence. Something like Netherlands event but provoked by foreign "friends". Espionage actions should be hard and expensive to get (our spy networks should have their own maintenance and own maintenance bar, this mechanics should be more complex overall), but they should be internal-politics atomic bombs. Making nearly whole Ireland revolt in Great Britain, making Burgundians revolt in France, making Mamluks revolt in Ottomans - many many examples. Conquering whole nations should generate some risks.
Summary of my ideas:
1. Make creating spy network cost money and time per point of development (base 1 week per 1 development - 100% infiltration of 1000 development country would take 20 years at base level, advisor, rival, espionage ideas would decrease it heavily).
2. Speed of creating spy networks and speed of their natural decay should be modified by "spy network maintenance" bar, just like we have one for colonies. Every existing spy network should constantly cost us money.
3. We can constantly maintain our spy networks in 2 countries, 3 if gov rank is empire (as we can have 3 rivals at once).
4. Counter-espionage actively decreases size of spy network of selected country. Not a detect chance. It should have same base power as creating spy network on us. If our enemy has proper advisor and espionage ideas - he would be like 50-75% faster in spy network creation and it will take longer due to counterespionage actions, but he will manage to eventually create this network up to 100%.
5. Network depending of their size should have chance to create communicate "Our diplomats speculate that country X has growing net of corrupted connections in our country". And this should be Spy Detection Chance. To give us infomation that these guys are building spy network against us and we need to use counterespionage to prevent bad things from happening. That would give us a proper chance to react.
6. Counterespionage efficiency should be directly connected to corruption removal bar. Espionage should be connected to corruption overall. Corruption should be nerfed in it's costs, but spy networks should increase our corruption by itself. Corruption should increase unrest (I have no idea why is it decreasing it...), and generally works similiar to how it works now, yet growing corruption should be a sign that someone is doing shady things in our country but we don't know yet who.
6.1. Another idea is to just remove counterespionage at all and make use of existing corruption mechanics as passive counterespionage with efficiency tied to maintenance bar. Actually this would be best idea to connect these two, corruption is underwhelming right now and should have some bigger importance. Still mechanics to be good should have some active element for player to be able to prevent bad things from happening and counterespionage gives such ability. So optimal may be having both of them and spy detection as information against who we need to use counterespionage.
7. Active espionage actions should be nukes (passive should give bonuses like they do and corruption growth). If something reduces size of spy network, which is expensive and take time to create - it should be an internal policy nuclear bomb. It should not be annoying like it is now, it should be BIG and should hurt like full scale war with our rival. For example we can decrase loyalty of certain Estate in country by like 20-30%. Oh hey France, I heard you have pretty big nobility estate? How about I turn them against you? There are sooo many options to make it hurt, like mentioned above cultural / religious uprising. Sabotage recruitment would be good if merc-spam was not a thing. Otherwise it should be something like "corrupt military officers" giving -5% discipline and -10% morale for 5 years. We made sure that only most unique morons are officers in your army. You know, nobility and officials bribing can do miracles. Many, many options. England would actually have a reason to pick Espionage against France, because it could REALLY help in balance of military power. "Well, maybe our army is not best, but we did everything we could to make sure that yours is even worse".
8. Some reworks would be needed to espionage ideas to play better with this new mechanics. For example first idea would still be wonderful, even OP so it should decrease bonus to +33% construction at most. Claim fabrication idea is crap and should be replaced with -25% spy network maintenance. Audit checks should be buffed a little, but it would give us extra counterespionage power what would be really, really nice iin new mechanics. Right now it does nothing important. Finisher would be nice if rebellions actually were a thing. In new mechanics they actually could be if we unleash nuke and giving them some extra power would be fun then.
God damn this post is too long.