All scripts of Shakespeare's comedy category that I've read are idiot plots. The characters constantly explain to the audience, but never to each other. It enables all the hijinks to unfold. So, it's been around at least that long.
For example, twins separated at birth. If the twins in the Comedy of Errors explained who they were, or if the cast once questioned either of them on their strangeness, everything could be clarified.
It extends to outside comedies, even the tragedy of Romeo and Juliet could have been avoided if Romeo had confirmed Juliet and Friar's plan, or had checked to see if she was still alive before offing himself.