This is a great question, and it led me down a bit of a rabbit hole. This kind of clause is called a Gapless Relative Clause. The sentence could be written as you have it, or with "I don't know what it is" - the "it" is called the Resumptive Pronoun which are "common in spoken English but are officially ungrammatical".
The Wikipedia article has a similar example:
In other cases, the resumptive pronoun is used to work around a syntactic constraint:
They have a billion dollars of inventory that they don't know where it is.
In this example, the word it occurs as part of a wh-island. Attempting to extract it gives an unacceptable result:
*They have a billion dollars of inventory that they don't know where ___ is.
"Resumptives are non-standard, but in such cases they're much better than their gapped counterparts, which people usually find incomprehensible, or at least very hard to comprehend."
So basically, your original sentence is "unacceptable"/"incomprehensible", but adding "it" would be grammatically incorrect but easier to understand. Best bet is probably to totally rephrase the sentence as others have suggested.
If it boils down to a choice between incomprehensible or "grammatically incorrect", then I would argue that it would be wrong to call it incorrect.
Grammar, especially in English, should be descriptive, not prescriptive. Language is a living and evolving thing.
The correct grammar should be whatever a native speaker would actually say and be understood by other native speakers when trying to communicate an idea.