No it won't be an automatic fail. Cripes. People have made spectacular mistakes way bigger than that in OSCEs and passed them with flying colours I can assure you.
You made a small error which in OSCE land would potentially cost you a single mark. In the real world, I've seen experienced clinicians speak exactly that kind of opening gambit as a starting point in real consultations. In reality, that kind of opening question actually does achieve things and move the consult forward: first, you established why the patient was actually there and if indeed they had earlier had a headache and two, you just gave them an opportunity to tell you otherwise. An unconventional approach I guess but so long as you arrived as your expected end result no one is going to complain.
Furthermore you can't really judge or mark every patient interaction because they are entirely unique and how I might communicate with someone may vary hugely to how another person might so there isn't really a direct comparison to be made.
If OSCEs were pass/fail entirely on the opening question they'd be pretty useless as an examination methodology to be honest.
Incidentally, just the other day I conducted a consultation which was so ineffectual my colleagues found it rather amusing. The patient in question had a fairly serious condition and absolutely none of the history/consultation would have yielded anything whatsoever in terms of leading you to a diagnosis. The reason being that the patient had earlier been so unwell they were completely out of it and thus remembered few details. I was nearly laughing at myself internally because no matter what question I asked or however I rephrased it the answers were yielding absolutely nothing.
Try not to beat yourself up about such things.