
945 So.2d 593 (2006)
Laurie M. HIGGINS, Appellant,
v.
Samuel F. HIGGINS, Appellee.
No. 2D06-286.
District Court of Appeal of Florida, Second District.
December 15, 2006.
*594 Lisa P. Kirby of Lisa P. Kirby, P.A., Naples for Appellant.
James J. Zonas, Naples, for Appellee.
NORTHCUTT, Judge.
The marriage of Laurie and Samuel Higgins was dissolved in 1996. In this appeal, Ms. Higgins challenges two post-judgment orders entered on January 9, 2006. The first holds her in criminal contempt, while the second transfers custody of the parties' son from her to Mr. Higgins. We reverse both orders.
The parties' divorce judgment incorporated the Higginses' marital settlement agreement, which provided that their son's primary residence would be with his mother. The agreement also established reasonable visitation for the father. In November 2005, Mr. Higgins sent a letter to the circuit judge below, complaining that Ms. Higgins was interfering with his visitation. The letter did not reflect that it was also sent to Ms. Higgins.
The judge responded with a letter to Mr. Higgins explaining that the parties should attempt to solve the visitation problem and, if they could not, Mr. Higgins should set a hearing on the issue. The judge advised that if a hearing was necessary, and if he found that Ms. Higgins had violated Mr. Higgins's visitation rights, the judge might hold her in contempt of court. The judge sent a copy of this letter to Ms. Higgins. Ms. Higgins then wrote the judge to explain that she was moving with her son to North Florida. She attached a letter she had sent to Mr. Higgins discussing her plans to relocate.
Thereafter, Mr. Higgins again wrote to the judge, this time to voice his disapproval of his former wife's proposed move. Then, on December 28, 2005, he mailed Ms. Higgins a notice of a hearing scheduled for fifteen minutes on the morning of January 9, 2006. Mr. Higgins did not file a motion or petition seeking affirmative relief. The notice stated simply that the hearing was to address "[v]is[i]tation and d[ecis]ion-making in the upbringing of son Samuel."
Both parties appeared at the hearing pro se. The proceedings were unreported, but it is apparent that the hearing became heated. At some point, the court held Ms. Higgins in direct criminal contempt. This order, scribbled by hand during the hearing, is the first order challenged on appeal. The contempt order recites:
Respondent refused after repeated warnings to stop interrupting other side and court. She stated that she was not following court orders of 1998 and would move anyway. Denied father visitation because of her beliefs without court hearing or consulting father.
After repeated warnings mother was placed in direct contempt.
Testimony as to [her] denial of visitation to husband based on her beliefs[,] it[']s not in son's best interest. She [relocated] to Lake City Fl. without consent of husband or court order.
. . . .
He has been denied all effective visitation with son. Wife has no[w] [relocated] w/o agreement of husband or pre-noticing him. She moved to Lake City with son.[1]
*595 At the bottom of the order, the judge wrote: "Sentenced to jail for six months[,] but to be brought back to court after other hearings are completed." Ms. Higgins was then taken into custody and removed from the courtroom.
Sometime later that day the judge had Ms. Higgins brought back before him. At that time, the judge ordered the parties to proceed directly to the office of the circuit mediation program to mediate their differences. Later in the day, the judge signed an odd document. It is entitled "Order" and at its foot is the handwritten notation "so ordered by Franklin Baker, Circuit Judge." Yet the first paragraph of the order states "[p]ursuant to the Notice of Mediation Conference in the Matter, on the 9th day of January 2006, the parties have agreed to the following. . . ." Both Mr. and Ms. Higgins signed the order, as did someone identified as the "Mediator[,] Preparer of Order of Court." This order transferred custody of the Higginses' son to Mr. Higgins, and it is the second order challenged in this appeal. Ms. Higgins contends the document is an order, while Mr. Higgins argues it is merely an agreement between the parties that the court approved.

The Contempt Order
In reviewing the contempt order we are mindful that a court may summarily punish for direct criminal contempt if the contemptuous conduct is committed in the court's presence. Fla. R.Crim. P. 3.830. However, the record must contain evidence that the court complied with the procedures mandated in rule 3.830.[2] Therefore, the court must ensure that a record of the contempt proceeding "is made and preserved in such a manner that it can be transcribed as needed." Fla. R.Crim. P. 3.721. The circuit court's failure to do so in this case requires us to reverse the contempt order. See Chamberlain v. Chamberlain, 588 So.2d 20, 23 (Fla. 1st DCA 1991).
Beyond this, the contempt order itself reflects that two of its three bases were not punishable as direct criminal contempt. Ms. Higgins's behavior during the hearingcommitted, as it was, in the judge's presencemight have supported a finding of direct criminal contempt. But her alleged interference with Mr. Higgins's visitation and her unilateral relocation necessarily took place outside the judge's presence. As such, they could be punished, if at all, only as indirect contempt. In that case, the judge would have been required to comply with the procedures set forth in Florida Rule of Criminal Procedure 3.840. Those procedures were not followed in this case, requiring reversal for that reason as well. Hagerman v. Hagerman, 751 So.2d 152, 153 (Fla. 2d DCA 2000).
Finally, the record affirmatively disproves the circuit judge's finding that Ms. Higgins's relocation was prohibited by the "orders of 1998." The circuit court *596 docket reflects that two orders were entered in the Higginses' case that year. One was a support order in a child support enforcement action brought against Mr. Higgins by the Department of Revenue, and the other granted the Department's motion to consolidate the dissolution case with the support action. Neither order imposed any obligation whatever on Ms. Higgins; certainly, the orders did not prohibit her relocation with the parties' son. Prior to 1998, the only order entered in the Higginses' case was the final judgment of dissolution of marriage. That judgment did not prohibit relocation. To the contrary, it adopted and approved the Higginses' marital settlement agreement, which provided that "[e]ach party may reside at the place he or she may select."
For the foregoing reasons, we reverse the order of criminal contempt.

The Child Custody Modification
The child custody modification must be reversed, as well. Ms. Higgins contends the order was procedurally and substantively defective because it modified the custody provisions of the final judgment when there had been no petition for that relief and it was outside the scope of the noticed purpose of the hearing. See Smith v. Smith, 927 So.2d 118, 120 (Fla. 2d DCA 2006) (stating that a judgment based on an issue not framed by the pleadings or not noticed for hearing implicates due process concerns and cannot stand); Burckle v. Burckle, 915 So.2d 747, 749 (Fla. 2d DCA 2005); Pelliccia v. Arce, 867 So.2d 619, 620-21 (Fla. 2d DCA 2004). Substantively, the order contained no analysis of any substantial change in circumstances that would justify modification of custody. See Wade v. Hirschman, 903 So.2d 928, 932-33 (Fla.2005). Indeed, the order would be reversible for those reasons if it was intended to reflect the judge's determination that the best interests of the parties' child warranted a custody modification.
It is likely, however, that Mr. Higgins is correct in his assertion that the order simply incorporated and approved the terms of the mediation agreement signed by the parties. If so, the circuit judge abused his discretion by approving the agreement. It is well established that a court is not bound by an agreement of parents regarding child support, custody, or visitation. Feliciano v. Feliciano, 674 So.2d 937 (Fla. 4th DCA 1996); see also Yitzhari v. Yitzhari, 906 So.2d 1250, 1257 n. 4 (Fla. 3d DCA 2005). One important reason for this principle is that the court must guard against the possibility that a parent might bargain away valuable rights of a child for reasons unrelated to the child's best interests. See Griffith v. Griffith, 860 So.2d 1069, 1071-1072 (Fla. 1st DCA 2003).
The record in this case amply demonstrates that the circuit judge did not guard against the strong possibility that Ms. Higgins agreed to surrender custody of her son for reasons other than the child's best interests. To the contrary, the record shows that she did so under highly coercive circumstances that were devised by the judge himself. With no prior notice and no counsel, this woman was ordered directly to mediation by the very judge who had just summarily held her in criminal contempt and placed her in custody to serve a six month jail sentence. Moreover, one of the judge's stated reasons for the contempt conviction was his announced determination that Ms. Higgins's attempt to relocate with the child was barred by court order and therefore was unlawful. As previously noted, this was simply untrue. Thus, in addition to the foregoing, the judge sent this woman into mediation *597 after seriously misadvising her about her rights.[3]
In a child custody matter, we review the circuit court's decision for an abuse of discretion. See Cleary v. Cleary, 872 So.2d 299, 301 (Fla. 2d DCA 2004); cf. Canakaris v. Canakaris, 382 So.2d 1197, 1203 (Fla.1980). While this is a deferential standard, the Canakaris court cautioned that a trial court's discretionary power is not unbridled. 382 So.2d at 1203. Whether the judge in this case approved a hastily drafted agreement, or whether he ordered a change of custody without taking evidence, no reasonable person with knowledge of the facts of this case would not question the propriety of his decision. See id. No reasonable judge, apprised of the highly coercive circumstances under which this child custody agreement was made, would have approved it. Accordingly, we reverse the custody order.
In a typical child custody case, upon reversal we remand for further proceedings. But the orders we reverse today did not arise from any proceeding in the proper sense. Rather, they had their geneses in the judge's ill-advised informal correspondence with Mr. Higgins. Beyond questions of due process, the requirement that parties frame the issues in formal pleadings and motions brings structure to court proceedings that is more conducive to orderly, reasoned decision-making. If the judge's response to Mr. Higgins's letter had contained an instruction to file a proper motion or petition rather than inviting him to simply set his complaints for hearing, the donnybrook giving rise to these orders might have been avoided.
Reversed.
FULMER, C.J., and CASANUEVA, J., Concur.
NOTES
[1]  This quotation represents our best effort to interpret the judge's handwriting.
[2]  Florida Rule of Criminal Procedure 3.830 provides:

A criminal contempt may be punished summarily if the court saw or heard the conduct constituting the contempt committed in the actual presence of the court. The judgment of guilt of contempt shall include a recital of those facts on which the adjudication of guilt is based. Prior to the adjudication of guilt the judge shall inform the defendant of the accusation against the defendant and inquire as to whether the defendant has any cause to show why he or she should not be adjudged guilty of contempt by the court and sentenced therefor. The defendant shall be given the opportunity to present evidence of excusing or mitigating circumstances. The judgment shall be signed by the judge and entered of record. Sentence shall be pronounced in open court.
[3]  Ms. Higgins also claims that the judge agreed to suspend the jail term imposed for her contempt if she gave custody of her son to Mr. Higgins. We have no record evidence to support this contention. Contempt is not a valid reason to order a change of custody. Burckle, 915 So.2d at 749; Pelliccia, 867 So.2d at 620-21. Ms. Higgins's assertion highlights why the court must ensure that a transcript of the sentencing proceeding in a criminal contempt action be included in the record.
