I think it depends on the question. If it's not a question of the form explicitly presented before, but answerable with a minute of thinking using the knowledge the student has already mastered, then it makes sense.
A time limited exam is probably the wrong place for that, though, due to the stress interfering with that kind of thinking. It would be better for a homework assignment.
If ChatGPT didn't exist.
Okay, maybe in class, on paper is the right place for that.