The subject is scanned and stripped of all magic items and active spells, then brought into the interrogation room or podium. A trusted spellcaster repeatedly casts zone of truth on the subject until it takes hold; if the subject resists every time, the process may have to be postponed to the following day. Then, the same magician or a different one casts detect thoughts. The magician with an active detect thoughts is known as the "empath."
A vetted "questioner" steps in, armed with the sheet of questions. The questioner instructs, "Please answer only in strict yes or no responses. Failure to comply is obstructing a legal proceeding at best, and a sign of guilt at worse." Then, the questioner goes down the list. At no point is the questioner ever to fixate on any one query; they should be time-efficient, keeping to a strict time limit of 30 seconds per question and answer exchange. The questioner checks off each box, recording the results.
Concurrently, the empath types out of the subject's surface thoughts. Where zone of truth forces the target to carefully consider a way to circumvent the inquiries, detect thoughts picks up suspicious trains of logic.
Afterwards, the questioner's sheet and the empath's are brought together and carefully studied, whether by law enforcement officials, or by those in the courtroom. The output is combined with other evidence to hopefully paint a picture of the truth. Any serious criminal is quite aware that a crime that can be rumbled by a single detect thoughts or zone of truth spell is a flimsy crime; thus, criminals often use circuitous methods to conceal the truth. These spells are undoubtedly useful in investigation and in practice of law, but they can merely supplement a more thorough analysis of a crime.
This setup could potentially be useful in an interrogation room or a courtroom. For this, I am picturing a more "modern society by way of magic" setting, such as Eberron, or even certain interpretations of Planescape or Spelljammer.