to claim a foster child as a qualifying child, the child must be with you by an authorized placement agency or by judgment, decree, or other order of any court of competent jurisdiction. this would satisfy the relationship test and having the child for over 6 months would satisfy the residency test .
when something like this happens your only option is to paper file.
Eventually, the IRS will send each of you a notice asking you to amend. If no one does, the IRS will send another notice asking each of you to provide proof. The one with the better proof gets it and the other gets a tax bill.
You can mail in your return to claim the children that lived with you over six months.
Keep records on the children from school, doctors, social workers, etc. as documentation of the time they lived with you, as the IRS may ask for this.
Click this link for detailed info on Claiming Foster Children.
**Mark the post that answers your question by clicking on "Mark as Best Answer"