iOS 10, Messages has bifurcated chat history with my wife I can't figure out what's going on here, but my wife appears twice in Messages on my phone (iPhone SE, iOS 10.3.1) and I appear twice in her Messages on her phone (iPhone SE, iOS 9.3.4).  There are two distinct chats with each of us, but there is only 1 contact for either of us on our phones (in the Contacts app).

I can't see any pattern to the chats either, There are messages between us that were sent with our iPhones, Macs, and iPads in both chats.  I can't see anything that clearly displays why either would be used at any particular time.  There's no pattern that I can discern.

This is also causing problems with chat history being properly recorded on our Macs.  Only 1 of these chats appears in Messages on our Macs, so there is a big gap of missing messages when we communicate using macOS.

So I suppose this is a 2-part question:


How did this happen?
How can we merge these two chats into one so that we don't lose any chat history but going forward will have only a single chat between us across all Apple devices?


EDIT:  To make matters even stranger - in further testing I sent a message from my iMac to my actual mobile phone number (rather than email address) in Messages.  The "send" side of the message (in Blue) went to one chat in my phone, the "receive" side (in grey) went to the other!  Both use the identical contact on my phone.  I just don't get this at all.

EDIT 2:  I'm fairly convinced at this point that somehow, this is related.  Every time I send myself a message from either my iMac or MBP, by selecting my email address (and NOT my phone number), after I send it if I click on my name in Messages, it is set to my phone number again.  I've no idea why, but Messages seemingly simply will not allow me to send messages via my email address any more.

EDIT 3:  More weirdness.  When my wife sends me a message, it goes to one of the two chats on my phone.  When I reply from my Mac, the reply comes from the other chat on my phone.  Even though both chats appear to come from the same contact (mine) and send to the same contact (hers).
This type of behavior is usually caused by Messages between phone numbers and iCloud ID's (typically your iCloud email address). You can click the target user for a message at the top of the thread (macOS) and it will show which address it was exchanged with (phone or email). On iOS, tap the circle with the username or photo at the top of the thread and the "recent" tag will be on the address used for those messages. See if the two threads are different. 

Also make sure your Mac is enabled to send and receive messages from your phone numbers on both Macs. This is not the default for the Mac, though it is for the iOS devices.