Have I missed something, or is it to be revealed next episode?
Also, haven't the Lannisters called a (temporary) truce with the Starks and Targaryens? Not that anyone can believe anything a Lannister says, but still...
He pledged to fight for the living in season 7. This is one of the reasons Cersei and Jamie have a severed relationship. She considers him a traitor basically.
Cersei made an agreement with Tyrion to have a ceasefire with Dany and Jon and the Lannisters would join the fight against the dead. Terms of the agreement remain unknown. However after everybody left Kings Landing, Cersei walked in on Jamie organizing the Lannister's march North. She informed him that not only would the Lannister's not being joining the war against the dead, but she has hired a mercenary army (The Golden Company) from Braavos to defeat Jon and Daenerys. Jamie is appalled by this and starts to walk out. Cersei has the Mountain block his path, and it looks for a moment like she might have her brother killed. Jamie calls her bluff, and walks out unharmed. He's last seen riding alone toward the North.
Why did he chose to ride North alone? Probably because he knew it was the right thing to do and that the war against the dead was more important than any of squabbles between the living.
It confirms what I mostly thought, which is that irrespective of Cersei's treachery, as far as Dany, Jon and the rest know, Jaime is on their side.
I guess I was surprised that Jaime went to The North alone, and that, according to the trailer for next week's episode (my apologies if you haven't seen it, but bear in mind I'm simply speculating) it appears Jaime will be forced to justify his loyalty to the inhabitants of Winterfell.
Jamie believes that Cersei can't hold on to power and that the Lannister cause is both lost, and on the wrong side of history. He's also a man who has just dumped the love of his life, and realizes he can't survive her long when the Lannisters go down... and he's clued in that he's thrown his life and honor away on the horrible Cersei.
So he's wrapping himself in the shreds of his dignity and is going out to at least regain some honor before he dies, he's always been aware that he had the potential to be a hero but has never done any heroic deeds. Well, at least he'll bring some political capital to Danerys, they'll keep him around for that.