Looking at the tax laws, it seems to me that both parents could file as head of household if one childs was with the mother for more than half the year and the other child was with the father for more than half the year.
This could be achieved with a custoday agreement that splits custody 50/50 for the first 364 days of the year (182 days each). Then, on the 365th day, one child stays with the mother and the other child stays with the father. Thus both parents would have one child for 183 days giving them each a qualifying child for HOH tax purposes.
Can a custody agreement be written as above and are there any ramifications of doing this?