My grandson has lived with me for the whole year, but his mother has claimed him without my consent.
If the child lived with you, you can claim him. Since the mother already claimed him our return will be rejected it you claim him now. File a paper return with an explanation of why you are claiming him and the IRS will sort things out.