Carl
Level 15

Get your taxes done using TurboTax

The IRS doesn't care what the judge may have said or stipulated. The IRS only has to follow the guidance of a federal judge. Since federal judges don't handle divorce or custody cases, that's not going to happen. The IRS has their own set of rules that must be followed, which clearly define who is the custodial parent. Basically, the custodial parent is the one at whose house the child slept the most number of nights during the tax year.
Now in cases where the custodial parent is going to allow the non-custodial parent to claim the child, the custodial parent has to provide a signed 8332 to the non-custodial parent.
So a lower court judge can very well order the custodial parent to sign the form, and hold that parent in contempt if they refuse. But a lower court judge does not and can not over ride federal tax laws.