
53 Cal.App.4th 1540 (1997)
In re JASON E., a Person Coming Under the Juvenile Court Law.
SAN DIEGO COUNTY DEPARTMENT OF SOCIAL SERVICES, Plaintiff and Respondent,
v.
JENNIFER E. et al., Defendants and Appellants.
Docket No. D026766.
Court of Appeals of California, Fourth District, Division One.
April 2, 1997.
*1542 COUNSEL
Carl Fabian and Judith Klein, under appointments by the Court of Appeal, for Defendants and Appellants.
John J. Sansone, County Counsel, Susan Strom, Chief Deputy County Counsel, and James H. Wellman, Deputy County Counsel, for Plaintiff and Respondent.
Thomas E. Nagle, under appointment by the Court of Appeal, for Minor.
OPINION
KREMER, P.J.
Jennifer E. and Gordon K., the parents of Jason E., appeal an order terminating their parental rights. Gordon also appeals the denial of his Welfare and Institutions Code section 388[1] petition. On appeal, the parents contend the juvenile court erred in not enforcing an agreement between the parents, caretakers and paternal grandparents for a permanent plan of guardianship. Gordon also contends the court erred in denying his section 388 petition. We affirm.

FACTS
Jason was born on April 3, 1994. Five days later the department of social services (Department) filed a petition seeking the protection of the juvenile *1543 court for Jason because the mother Jennifer used illegal drugs during her pregnancy with the result Jason was born under the influence of drugs. At the time the petition was filed, Jennifer stated one of two men could have been Jason's father. Paternity tests subsequently determined Gordon was Jason's father.
By May 9, 1994, Jason was placed with his paternal aunt and uncle (his foster parents) where he remained throughout the dependency. In June 1994, the juvenile court declared Jason E. a dependent child, ordered him placed in foster care, and ordered reunification services for the parents.
Neither parent completed their reunification plans and in February 1996, after a contested hearing, the court terminated reunification services and ordered the setting of a section 366.26 hearing.
In the assessment report for the section 366.26 hearing, the social worker indicated Jennifer had seen Jason only five times since his birth and Gordon, after an extended period of sporadic contact, had visited eight times between the end of February 1996 and May 14, 1996. During the last visit, Gordon was agitated when he arrived. The room where the visit occurred smelled because the aunt had just changed Jason's diaper. This upset Gordon. He felt the foster parents should have changed the diaper earlier, felt they had planned it this way to aggravate him, sat in a chair on the side silently for a few minutes and then expressed anger to the social worker about the system, the social worker and the foster parents, stating the foster parents had brainwashed Jason so "[h]e won't have anything to do with me." The social worker unsuccessfully suggested they talk about these matters after the visit and that Gordon spend his time visiting with Jason. Gordon interacted very little with Jason during the visit.
The social worker described Gordon's relationship to Jason as similar to a "friendly visitor." The social worker recommended a permanent plan of adoption and reported Jason's paternal aunt and uncle were willing to and had been approved to adopt Jason.
Gordon filed a section 388 petition on July 8, 1996, requesting Jason be placed in long-term foster care. He stated he "had numerous visits" with Jason, was trying "to strengthen the parent-child bond," and believed with more time could "establish and maintain a full parent-child relationship as he has with the minor's non-dependent sibling who is in the father's custody."
On July 22, 1996, a few days before the scheduled hearing, Dr. Heller performed a bonding study on Gordon and Jason. Dr. Heller reported *1544 Gordon had "pleasant interactions" with Jason, "demonstrated a commitment to maintaining a relationship with his son" and had an ability to interact with him in an appropriate manner. Dr. Heller, however, also reported that Gordon at times ignored Jason's developmental capabilities and emotional attachments and concluded Gordon's "behavior during the assessment session strongly suggests that [Gordon] may expect his son to spontaneously attach to him, rather than creating opportunities for such an attachment to develop." Dr. Heller also noted Jason had a "strong parental bonding" to his foster parents and separation from the foster parents "might be seriously detrimental to Jason's well-being." Dr. Heller recommended Jason remain with the foster parents but continue to have contact with Gordon.
The hearing on Gordon's section 388 petition and the section 366.26 hearing began on July 25, 1996.
At the hearing, evidence was presented that Gordon had not visited Jason since May 10, 1996.
Gordon's mother testified Gordon and his daughter, Brittany, lived in her household. The grandmother stated Gordon was an "appropriate parent." She explained Gordon gave his daughter baths, washed her hair, did her laundry and helped his daughter clean her room. She stated when Jason came to visit Gordon at her house, Jason had been "kind of scared" at first but became accustomed to the visits and was later eager to see Gordon. She also testified to a falling out between the grandparents and father on the one hand and the aunt and uncle on the other hand; the family members had not been talking to each other since December 1995.
The aunt testified she had had no conversations with Gordon since November 1995; when she tried to call him, he hung up on her. She stated she never denied him contact with Jason and she never stopped him from coming over or arranging a visit. She stated the visits she observed in her home or the grandmother's home generally "went good" but noted that when she brought Jason over to the grandmother's house, Gordon would typically interact with Jason for five to fifteen minutes and then go out by himself in the garage and that the visits in the aunt's home were generally for special occasions such as a birthday party during which Gordon would be there for about half a day and spend more time with Jason. She and her husband wanted to adopt Jason to keep him in the family. She stated Gordon would be able to continue to see Jason if he were adopted.
Dr. Heller, who conducted the bonding study, testified Jason had a "pleasant relationship" with Gordon that was affectionate and playful. However, Dr. Heller stated Jason's primary relationship was with the foster *1545 parents who were his psychological parents. Dr. Heller believed the father was more than a "friendly visitor," explaining "obviously I was a very friendly visitor ... and if you compared it, the interactions between the boy and the father, [while] the boy was very playful with me, too, and he let me hug him and all and everything ... but in comparing the relationship  the interaction with me with those that he had with his father, there was a big difference...." Dr. Heller believed later when Jason was in his preteens and dealing with issues of identity, he would suffer a detriment if contact with his father were terminated. Dr. Heller stated she believed Jason should remain with the foster parents and continue contact with Gordon "provided that both sets of adults become amenable to working together." She stated if they were not amenable, then in her opinion the contact with Gordon would be detrimental.
At the end of the hearing, the court denied Gordon's section 388 petition because granting it would not promote Jason's best interests. The court did not rule on a permanent plan of care for Jason but instead granted a 30-day continuance and granted Gordon's motion for mediation "to see if the families can work out some of these problems."
Jason's natural parents, his paternal aunt and uncle and his paternal grandparents attended a mediation session conducted by a retired judge. At the end of the session, these relatives signed a written stipulation which provided, among other things, for a long-term plan of guardianship for Jason. Within 24 hours, Jason's paternal aunt and uncle repudiated the agreement.
At the hearing held on August 26, 1996, the court was presented with a copy of the mediation and a report from the social worker indicating the repudiation of the agreement by Jason's foster parents. The Department, the foster parents and Jason's attorney argued for a long-term plan of adoption, while the parents urged the court to accept the mediation agreement. The court noted it was "unfortunate the mediation worked the way it did" and admitted it was probably a "bad idea." The court found Jason was likely to be adopted and terminated Gordon and Jennifer's parental rights.

DISCUSSION
The parents contend the court should have enforced the mediation agreement and ordered a permanent plan of guardianship. Gordon asserts the mediation agreement was an enforceable judgment pursuant to Code of Civil Procedure section 664.6 and that at a minimum the juvenile court should have held "a full evidentiary hearing on whether or not the settlement *1546 agreement was properly entered into." Jennifer concedes the agreement was not "binding" on the court, but argues the court should have enforced the agreement. She asserts the court's rejection of the agreement was "inappropriate" under the circumstances of this case.[2]
The parents argue because settlements are generally favored by the law (see Poster v. Southern Cal. Rapid Transit Dist. (1990) 52 Cal.3d 266, 270 [276 Cal. Rptr. 321, 801 P.2d 1072]), settlement agreements generally should be enforced absent circumstances showing fraud, duress or undue influence. Gordon points to In re Marriage of Assemi (1994) 7 Cal.4th 896 [30 Cal. Rptr.2d 265, 872 P.2d 1190] (Assemi), where the court enforced a marital stipulation agreement involving division of a couple's property even though the wife had repudiated the agreement on the basis the husband had underestimated the value of certain bank accounts by $60,000. The court in Assemi held since the parties had made an oral stipulation "`before the court,'" it was enforceable under Code of Civil Procedure section 664.6 and there was substantial evidence to support a finding the parties had entered into a binding agreement. (Assemi, supra, at pp. 900, 911.) The Assemi court stated in determining whether the parties entered into a binding settlement, "... a trial court should consider whether (1) the material terms of the settlement were explicitly defined, (2) the supervising judicial officer questioned the parties regarding their understanding of those terms, and (3) the parties expressly acknowledged their understanding of and agreement to be bound by those terms." (Id. at p. 911.)
Code of Civil Procedure section 664.6 provides: "If parties to pending litigation stipulate, in a writing signed by the parties outside the presence of the court or orally before the court, for settlement of the case, or part thereof, the court, upon motion, may enter judgment pursuant to the terms of the settlement. If requested by the parties, the court may retain jurisdiction over the parties to enforce the settlement until performance in full of the terms of the settlement." (Italics added.)
Initially we note Code of Civil Procedure section 664.6 does not make it mandatory for a court to adopt a settlement agreement as a judgment; the statute states a court "may enter judgment pursuant to the terms of the settlement...." (Italics added.)
(1) The parents argue since the agreement met the requirements of Code of Civil Procedure section 664.6 and the requirements of a binding agreement as set forth in Assemi, supra, 7 Cal.4th 896, the aunt and uncle's *1547 repudiation should have been disregarded and the court should have enforced the mediation agreement by ordering a permanent plan of guardianship.
There are several problems with this argument. The first problem is the faulty premise that the parties to the agreement  the parents, paternal grandparents, and paternal aunt and uncle  had the power to settle the matter, i.e., to determine a permanent plan for Jason. None of the parties to the agreement, either singly or in combination, had such authority or power. Obviously, the parents lacked such power  Jason had been removed from their custody and control by the juvenile court declaring Jason to be a dependent child. The aunt and uncle did not have the power  their custody was only as foster parents and subject to the order of the court. The paternal grandparents had no such power to determine Jason's permanent plan  they had neither custody nor control over Jason. Thus, this case is very different from Assemi, supra, 7 Cal.4th 897, where the parties had the power to determine the subject matter of the agreement, i.e., the division of property.
Since the signatories to the agreement lacked the power to settle the issue (the permanent plan for Jason), the court was not bound by the agreement; it constituted merely a recommendation as to Jason's permanent plan which the court was free to consider the same as any other evidence and give to it such weight as it deemed proper. Similarly, the repudiation of the agreement of the mediation agreement by the paternal aunt and uncle was evidence which the court could properly consider.[3] The juvenile court that placed Jason under its protection had the sole power to determine Jason's permanent plan and no agreement by the parties could strip the court of that power.[4]
A second problem with the parents' argument is their premise that this mediation agreement is the kind of agreement which can be specifically enforced. In Assemi, supra, 7 Cal.4th 897, the issue before the court was whether the settlement agreement could be specifically enforced against the wife and be entered as the judgment in the case. Specific performance is not available in all situations. It is not available if enforcement would be unjust or unreasonable. (Civ. Code, § 3391.) Requiring a child's caretakers to agree to guardianship when they believe adoption would be in the child's best interests would be manifestly unreasonable and unjust.
A third problem with the parents' argument is that neither the Department nor Jason's attorney participated in the mediation or were signatories to the *1548 agreement. Thus, they were not bound by the agreement and were free to recommend a long-term plan of adoption.[5] The court was entitled to weigh these recommendations against the mediation agreement.
We conclude, contrary to Gordon's contention, that the agreement did not bind the court. (2a) We further conclude, contrary to Jennifer's position, that failure to implement the agreement was not "inappropriate" since, based on all the evidence presented  including the agreement  the court properly rejected guardianship in favor of adoption.
(3) At the permanency planning hearing, "... the goal of the proceedings changes from reunifying the family to locating a permanent home for the child apart from the parent." (In re Taya C. (1991) 2 Cal. App.4th 1, 7 [2 Cal. Rptr.2d 810].) The permanency planning hearing aims "to end the uncertainty of foster care and allow the dependent child to form a long-lasting emotional attachment to a permanent caretaker." (In re Emily L. (1989) 212 Cal. App.3d 734, 742 [260 Cal. Rptr. 810].) The abiding principle at the permanency planning hearing is the welfare and best interests of the child. (See In re Kerry O. (1989) 210 Cal. App.3d 326, 333 [258 Cal. Rptr. 448].)
The Legislature has made it clear that adoption is the preferred permanent plan if it is likely the child will be adopted. (In re Brian R. (1991) 2 Cal. App.4th 904, 924 [3 Cal. Rptr.2d 768].) The Legislature, however, has provided that adoption should not be ordered if termination of parental rights would be detrimental to the child because "[t]he parents ... have maintained regular visitation and contact with the [child] and the [child] would benefit from continuing the relationship." (§ 366.26, subd. (c)(1)(A).) For this exception to apply, it must be shown that there exists "a significant, positive, emotional attachment from child to parent" and that relationship of the parent to the minor is one of parent and child rather than one of being a friendly visitor or friendly nonparent relative such as an uncle. (See In re Autumn H. (1994) 27 Cal. App.4th 567, 575-576 [32 Cal. Rptr.2d 535].)
(2b) The evidence here overwhelmingly supported adoption as the permanent plan. It is undisputed that Jason was likely to be adopted; his aunt and uncle wished to adopt him and they had been approved for adoption. It was also clear that no beneficial child/parent relationship existed between Jason and either of his parents. Neither parent had maintained regular and *1549 consistent visitation with Jason. Jennifer had visited only five times during the dependency. Gordon had visited more often but his visitation was sporadic, some of the visits were of brief duration, he had not visited Gordon since May 10, 1996, and during his last visit he interacted very little with Jason. Further, while Dr. Heller, who conducted the bonding study, recommended against termination of parental rights, her recommendation was based on a possibility that in the future Jason might benefit from continued contact with his parents in resolving identity and other issues. Her study, however, made it clear that Gordon at that time did not have a parent/child relationship with Jason.
The court properly rejected Gordon's section 388 petition. Not only did Gordon fail to establish new circumstances justifying his petition to vacate the section 366.26 hearing and order long-term foster care, but as we have explained above, the evidence established a plan of adoption was in Jason's best interests.

DISPOSITION
The judgment is affirmed.
Haller, J., and McIntyre, J., concurred.
Appellants' petition for review by the Supreme Court was denied June 18, 1997.
NOTES
[1]  All statutory references are to the Welfare and Institutions Code unless otherwise specified.
[2]  Jennifer contends we must reverse because the court "was not free to ignore the agreement." This contention is without merit. The record does not support her contention the court ignored the agreement.
[3]  Contrary to Gordon's argument, there was no need for a full evidentiary hearing on whether the aunt and uncle had good cause (i.e., acted pursuant to fraud, duress or undue influence) for repudiating the mediation agreement, since not only was the agreement itself only advisory, but as we explain later, it was not entitled to specific performance.
[4]  Nor does the record suggest the court intended to delegate such power to the parties (even presuming such a delegation were possible).
[5]  The parents argue the Department and Jason's attorney waived participation in the mediation but cite no cases to support a conclusion that parties who decline to participate in settlement negotiations are nonetheless bound by a settlement agreement reached by other parties involved in the case.
