Ever gone on a week long trip and discovered one of the people drove you NUTS?
I've done it and the only thing for it is to stay silent and stay away from the offending party as much as possible. On long canoe trips to avoid "canoe fever" we used to swap out paddling partners.
Yes, even good friends's little habits can become amazingly annoying on a long trip but you have to remember that you have some traits that annoy the hell out of them too. Try to laugh and joke about it – IF possible. I mean, really, getting in an argument about how to wash the dishes is truly stupid – don't ask.
Usually a nip of elixer of Jim Beam around a campfire will smooth things over and get people laughing at themselves. Just don't imbibe too much. You may find to everyone's dismay that one of the hikers annoying habits is they are a fighter when over-served.
P.S. Maybe that's why most of the long distance hikers are solo. :o)

