This is How You Lose the Time War by Amal El-Mohtar and Max Gladstone
In the aftermath of a devastating battle, a cybernetic time-soldier finds a letter left by her opponent, addressing her as "Red" and signed with the moniker "Blue." It's a gloating message of victory, but one that sets off a correspondence through time and space. Red and Blue hide words for each other in bones, in seeds, in water, in trees. Chasing each other through alternate histories, they encode these messages in secret, lest their overlord commanders find out and call it treason.