D&D 5e has a handful of spells and features meant to protect the user against lie-detection magic. The examples I'm aware of are the Glibness spell and the Mastermind Rogue's Soul of Deceit subclass feature. Specifically, Glibness says:
[...] no matter what you say, magic that would determine if you are telling the truth indicates that you are being truthful.
Soul of Deceit provides an identical feature, but then goes a bit further:
[...] no matter what you say, magic that would determine if you are telling the truth indicates you are being truthful if you so choose, and you can’t be compelled to tell the truth by magic.
At first glance, these "anti-lie-detector" features seem designed to defeat Zone of Truth. I certainly thought so when I wrote this answer. However, as the comments on that answer rightly pointed out, Zone of Truth is not precisely a lie-detection spell, and the precise interaction between that spell and these features is not clear. I'm going to quote the full text of the spell since any of it might turn out to be important:
You create a magical zone that guards against deception in a 15-foot-radius sphere centered on a point of your choice within range. Until the spell ends, a creature that enters the spell's area for the first time on a turn or starts its turn there must make a Charisma saving throw. On a failed save, a creature can't speak a deliberate lie while in the radius. You know whether each creature succeeds or fails on its saving throw.
An affected creature is aware of the spell and can thus avoid answering questions to which it would normally respond with a lie. Such a creature can be evasive in its answers as long as it remains within the boundaries of the truth.
In short, a failed save causes the following:
- The affected creature can't lie
- The affected creature is aware of the compulsion
- The caster knows the creature failed their save
while a successful save only alerts the caster that the save was passed. Importantly, every creature in the spell's area makes this saving throw even if they are immune to all effects of the spell.
The problem is that Zone of Truth doesn't directly tell the caster whether the affected creature is lying or not. It tells the caster whether or not the creature has failed their saving throw against the spell. So despite the name of the spell, it's not clear whether this is "magic that would determine if you are telling the truth". The extra clause of Soul of Deceit seems like it should clearly defeat the spell's compulsion against lying, but beyond that it's not clear what other effects either Soul of Deceit or Glibness protect against.
So, assuming the creature fails their saving throw and is affected, to what extent does either Glibness or Soul of Deceit protect the affected creature from the effects of Zone of Truth? Specifically, do either of these allow the affected creature to speak a deliberate lie, and if so, what information does the caster of Zone of Truth receive when they do so, and how does it differ from the information the caster would receive if the affected creature did not have the effect protecting them?
Note that I am not asking about the affected creature's ability to be evasive or or avoid answering a question as described in the last paragraph of Zone of Truth. Being evasive is always allowed by the spell. Assume that the affected creature wants/needs to tell a deliberate lie.