After you file

I do not believe that the mother can agree to that since agreements do not apply to emancipated children over the age of 18 in most states, but 21 in all states.   The half year rule is the deciding factor for an adult Qualifying Child.  You simply cannot claim an adult 21 year old as a Qualifying Child if you cannot pass the residency test regardless of what you agree to.
**Disclaimer: This post is for discussion purposes only and is NOT tax advice. The author takes no responsibility for the accuracy of any information in this post.**