I DMed a specific situation last night, and I'm not totally sure that I handled it in the right way.
For the last two sessions, the team has been facing off against a clever homebrew wraith (less mindless, more thoughtful, a little weaker to balance), who's moved to hit-and-run tactics. Frustrated, they tried to draw him out by talk, and he demanded they drop all their weapons and still their hands before he came out.
There were a couple of false starts when he ducked back out of sight when the rogue tried to hide some daggers, and again when the rogue cast a spell but was caught. Eventually he came out and they had a conversation - with him naturally on edge and waiting to dive out of sight, and with the party hands-up, talking, presumably also waiting for their moment.
The wraith was on top of a thirty foot temple roof, and they were standing on the stairs below, looking up at him. After some talk the cleric decided to take his shot with a spell (Guiding Bolt).
Based on the situation I let the wraith and the cleric roll opposed initiative to see if he got the spell off before the wraith ducked, but the rest of the party felt a bit cheated that they weren't included in that round.
My rationale was that not looking at each other, not having planned a trigger, having put the wraith on edge already, that they wouldn't all be aware that it was go time. Essentially the cleric caught them all off-guard because the cleric started casting without any sort of preamble, during other conversation.
I know it's not exactly normal surprise rules. How is this situation properly handled?