When dealing with custody issues the first thing you must determine is who has jurisdiction. Jurisdiction is a State's power to make decisions over a certain issue and can be a tricky thing. When it comes to custody, states look to something called the UCCJEA, or Uniform Child Custody Jurisdiction and Enforcement Act to determine jurisdiction. Jurisdiction cannot be consented to by the parties. So this is not a matter of what two parents agree to, it is a matter of determining which state has the power to make decisions under the UCCJEA.
Home-state Jurisdiction: The first way that a State can get jurisdiction is by being the home-state of the child, the place where the child has lived for the last 6 months, or since their birth if they are less than 6 months old. This is called initial home-state jurisdiction. Once a state claims initial home-state jurisdiction that state retains jurisdiction, or has continuing jurisdiction, until it gives up such jurisdiction or until another State determines that no one remains in that State any longer. A State must claim home state jurisdiction. It does this by entering an order that says pursuant to the UCCJEA we have initial and continuing jurisdiction over this child.
Significant Connections Jurisdiction: If there is no home-state or if the home-state has declined jurisdiction then a state has another way to get jurisdiction through a consideration of significant connections. Under this theory a state can get jurisdiction if: 1) there is significant connection by at least one person (this has to be more than just living in a state, the person has to be really connected to the state - i.e. have family there, have real estate, a job, etc.) 2) there is substantial evidence available to that state about the child's welfare, care, protection, etc.
Catch-All or Last Resort Jurisdiction: If neither home-state nor significant connection jurisdiction works or any state who could have jurisdiction has declined to claim jurisdiction, then another state can claim jurisdiction. This would rarely be the case.
Emergency Jurisdiction: Any state, regardless of the above or of prior orders may claim temporary jurisdiction in the case of an emergency in extraordinary circumstances. These orders are only for the protection of a child who is in the state and in danger.
Jurisdiction over custody of children can be complicated. If you or the other parent have lived in multiple states, you definitely want to consult an experienced family law attorney.