Consider that the disregulation caused by sensory needs could be the culprit behind any behavior you see. This means that a child is upset and shuts down because she is hot or hungry or is defiant because he is tired and has to go to the bathroom. If you can "shelve" the behavior and help them regulate first, the behavior will probably go away. Now, this is definitely not going to be true 100% of the time but if you can QUESTION a response that is unexpected rather than REACT to a response that is unexpected, you may help a child to be more regulated or better able to self advocate for what they need.
I almost think of it as a much younger child. I was at a restaurant and overheard the mom of a 2yo do this when her kid was not eating but instead doubling down on a controlling behavior. The mom said, "I think it is time for a nap." We do this with younger children, or preverbal children a little more easily but the exact same thing could account for a lot of the incidents that are happening for older kids with different neurology or physiology.
To problem solve in the moment, I think of the hierarchy of needs, water ~ food ~ sleep ~ bathroom ~ tactile needs ~ emotional disappointment ~ overall understanding of what is going on.
This thinking does require the requesting adult to swallow their original intent a bit. Said differently, asking yourself, "Do I really need hold my ground on this one, or can I work with where my child is coming from?"
It might feel like you are not teaching them what they need to know, or you're not being a good parent because they "should be ______". The other side of that is that if a child is being controlling, he is not actually in a mind and body space to learn anything so your desire to teach him a life lesson is undermined from the get go. He cannot learn when he is disregulated. No one can.
How do I remember to do this in the moment?
** The following list assumes that the actions that are taken in defiance are safe but just not preferred. Safety of a child is of course the first priority at all times.
if you find yourself repeating an instruction, stop after the second one is ignored or defied and go through the above list of needs to see if everything is taken care of
if you give a direction or make a request and it is ignored or defied, wait 1 minute before saying or doing anything and just do what you need to in that minute to remain calm yourself. A minute is a REALLY long time when you are standing there expecting one thing and getting another so try it out and see how long it feels.
BEFORE giving a direction, think about what responses you might get so that you may be less surprised or taken aback by what he comes up with. A quote from Jim Rohn (a motivational speaker) is "Learn to turn frustration into fascination..." I have this from Dr. Tina Bryson and Barbara Avila in conjunction with parenting and teaching children. When she is walking to her room and you are walking to the kitchen after you told her it was lunch time, turn it into a puzzle to solve "why is she going there?" "what can we do in there that we aren’t doing in the kitchen?" "what is she not saying?" "what can I help her with?"
Let yourself off the hook if you change your mind and give up on a "fight". He just might not be ready for whatever you asked him to do. He is not going to say, "Guys, I have had a rough day because my play date cancelled and I am feeling sad about my sister going to camp and I am really hot right now, so if you could please go easy on me, I would really appreciate it." But that is exactly what he needs.
Give a choice within no choice so that you have already done the work of winnowing down the options of what he can do but he genuinely gets to pick between the ones you picked.