Common sense should dictate that you leave the children out of the nuts and bolts and day-to-day struggles of your divorce, even if that divorce involves a custody battle.
Children are not emotionally equipped or mature enough to understand and deal with all the emotions that accompany a divorce, nor should they be asked to deal with them even if they are mature enough to understand and deal with those emotions. The divorce is a failed relationship between you and your wife, not you and your kids. Nonetheless, there remains a large proportion of divorcing men that try and interject the children into the equation by using the children as messengers.
Let's address this immediately and clearly. The first thing I would advise you to do is to be an adult. You are not in junior high school. The days of scribbling notes on pieces of paper and passing them down the line to someone else is over. If you have an issue with someone, or you need to discuss serious matters with someone, then you need to discuss it with them directly. Ideally, you should be able to talk to your soon-to-be ex-wife face-to-face, even if it is uncomfortable to do so. However, I understand that sometimes this simply isn't going to happen due to the amount of anger or bitterness inherent in the failing relationship. If this is the case with your divorce, you have other options.
The first option is the telephone. All you have to do is pick up the phone and call your soon-to-be ex-wife. You can then have a conversation about whatever issue you need to, without the added stress of having to look at her or be near her. If things get too heated, uncomfortable, or threaten to spiral out of control, all you need to do is hang up.
The second option is email. You can sit down in front of your computer, calmly type a detailed message, and even save that message to come back and review again before you send it to her. This affords you the opportunity to revise and sharpen your message so that your thoughts and ideas are expressed clearly, concisely, and without any sarcasm or anger that might have bubbled to the surface.
You may have noticed that at no point have I suggested using the children as messengers. That's because it is never a good option. There are so many ways to communicate with your spouse these days that there is never a need to put the children in the middle of this process by using them as messengers. It's not their fault you're getting a divorce, and they don't need to be dragged into the process. Children should not be privy to adult conversations, especially ones that involve them or might affect them indirectly. You need to leave them out of it; period. Needing an intermediary to communicate simple messages to your wife is a sign of immaturity. Be an adult.
Whether there is divorce in your future or you need to respond to a divorce filing by your wife, I am here to advise.