“In proceedings for dissolution, nullity, and legal separation, Fam. Code, § 2010, subd. (b) provides jurisdiction over the “custody of minor children of the marriage.” In addition, Fam. Code, § 3120 authorizes an independent action by a spouse for “the exclusive custody of the children of the marriage. “Children of the marriage” include the parties’ natural and adopted children, but not stepchildren. Visitation is considered a limited form of custody, and visitation claims are included in the jurisdiction provided by Fam. Code, § 2010, subd. (b). [Perry v. Superior Court, 108 Cal. App. 3d 480, 166 Cal. Rptr. 583 (5th Dist. 1980)] However, Fam. Code, § 3101, providing jurisdiction over stepparent visitation claims, does not extend to custody claims. And Fam. Code, § 3022, which grants the court broad discretion to make “necessary and proper” custody orders, does not create subject matter jurisdiction; the courts’ authority to deal with custody or visitation matters is constricted by the statutory provisions governing jurisdiction. [In re Marriage of Lewis & Goetz, 203 Cal. App. 3d 514, 250 Cal. Rptr. 30 (4th Dist. 1988)] [T]he doctrine of estoppel does not apply to stipulations between parents that attempt to divest the court of jurisdiction over child custody. Such stipulations are void because they violate the strong public policy making the children’s best interests the primary consideration in custody determinations. [In re Marriage of Goodarzirad, 185 Cal. App. 3d 1020, 230 Cal. Rptr. 203 (5th Dist. 1986)] If a child’s status as a “child of the marriage” is terminated due to adoption or other legal proceedings, the dissolution court’s jurisdiction over custody of the child also terminates. [Marckwardt v. Superior Court, 150 Cal. App. 3d 471, 198 Cal. Rptr. 41 (2d Dist. 1984)]”
[California Civil Practice Family Law Litigation [certain citations omitted]]