I've been thinking about a method to utilize secret threats without removing player agency. This is especially important for when a character would be forced to make a saving throw by a stealthed enemy or a hidden trap without a perceptible effect. Are there any good methods of accomplishing this?
My goals include:
Preventing metagaming by avoiding player knowledge of the event
In so far as the player may have his/her character continue more carefully if they know they failed a check against a Wisdom save (since that is the save affiliated most with curses, etc.). My players are very knowledgeable about the game and highly skilled in deduction; they have figured out what the rolls mean even with very little information.
Avoiding feelings of unfairness such as if I were to not allow them to roll
Maintaining the feel of player agency such as by not just rolling myself
To clarify what I mean by by player agency, at one point in time I discussed with my players the idea of me rolling behind a DM screen using their stats to avoid their knowledge and they said that, even though they do trust me, they prefer to know that they failed the roll leading to the negative effect rather than having me roll low on their behalf. This is the feeling I'm trying to avoid (even though mathematically it has the same result barring modifiers like Bardic Inspiration).
Example
One example that came up in my game revolved around detect thoughts. My players were exploring an abandoned Duergar mine and discovered markings of strange hexes throughout the mine. When my wizard casts detect magic followed by dispel magic on the markings, the Duergar imprisoned in the wall emerged and told them a group of dark cloaked beings had invaded imprisoning the Duergar and stealing a significant number of diamonds. My players began planning a way to track down and assault the thieves, but unbeknownst to them, a scout from the group was sent back knowing the adventurers were on their way to the mine.
While the bard did cast zone of silence, the scout knew the spell detect thoughts and would be able to learn their plan if they failed the save. The players then realized upon noticing that the enemy somehow knew the plan, that detect thoughts must have been used on that "random roll" I had them perform. I don't know if this factored in to their decision making as my players tend to avoid metagaming too much, but the bard and wizard did use mind blank "just in case" when they reached the old lair of the enemies they had tracked down (a cave that used to house an elder brain).