I've been writing for a long time. One of the most frustrating experiences is when a character refuses to behave as you wish them to.
What do you do when your character pushes you around?
You go into your chapter with a clear path all marked out, an outline of what needs to happen, the emotions that have to be expressed, when suddenly, out of nowhere, your characters start doing things that you didn't expect and didn't want. You realize that they'll soon have you cowering in a corner begging them for a breadcrumb pathway out of the dead-end scene.
I have found that there are 2 ways to handle this.
1) DELETE, DELETE, DELETE, DELETE :-)
2) Let the characters play through
Our subconscious is thinking about things in a way our conscious minds cannot track. I believe that this is where our characters get their will to try to control their destiny. Just remember that though these little id battles can create beautiful rich sub-plots, that you, as the author, need to steer the story with a hand at 10 and 2 at all times.
Everything that you write must have a purpose within the story, otherwise, it needs to be cut. DELETE, DELETE, DELETE, DELETE :-)
Or I kill off the character in the story.
Guess, I'm just as vicious. :)