Imagine a person who is otherwise perfectly sane who claims to see a one-time revelation in his sleep/daydream and commits a crime, despite two witnesses warning him.
He understands the magnitude of his deed but swears that the realism of his experience left no doubts in his heart.
To stress, he claims no "long-lasting" prophetic abilities. The point here is that his reaction to the warning would be doubtful in my view and would not allow for conviction.
How is this "God told me so" claim dealt with in Jewish court when a defendant tries to justify his crime?
How differently would it be treated in the times of the first Temple when the prophecy was common or the second Temple when the sages concluded that it stopped?