
829 A.2d 937 (2003)
In re T.S., Appellant.
No. 99-FS-1228.
District of Columbia Court of Appeals.
Submitted December 3, 2002.
Decided August 7, 2003.
Hope Umana, appointed by the court, was on the brief for appellant.
Robert R. Rigsby, Corporation Counsel at the time, Charles L. Reischel, Deputy Corporation Counsel at the time, and Rosalyn Calbert Groce, Supervisory Corporation Counsel, were on the brief for appellee.
*938 Before TERRY and STEADMAN, Associate Judges, and BELSON, Senior Judge.
STEADMAN, Associate Judge:
T.S. ("appellant") appeals the trial court's denial without a hearing of her motion that the Department of Human Services ("DHS") be required to show cause why it should not be held in contempt for its alleged failure to feed appellant during the approximately twenty-four hours that she was in custody. The trial court made its own sua sponte investigation into the alleged facts and, relying on the outcome of that investigation, denied the motion without a hearing. We agree with appellant that the trial court's investigation and reliance on its outcome were unjustified but hold that, in the posture of this case, the denial of the motion should be affirmed.

I. Facts
Appellant, a sixteen-year-old juvenile, was alleged to be a person in need of supervision ("PINS"). Appellant appeared before the trial court on September 24, 1998 for a status hearing. Prior to this hearing, appellant had lived, at different points, with her mother and her grandmother. Because both appellant's mother and grandmother were hospitalized at the time of the September 24, 1998 status hearing and because of appellant's history of violating curfew and of running away, the trial court issued an order directing the Department of Human Services to place appellant "forthwith" in Kenyon Youth Shelter House. In fact, appellant spent the night at Oak Hill Youth Center. The next morning, on September 25, appellant was brought before the trial court for a requested emergency hearing and was released to her family.
At the September 25 hearing, appellant's counsel asserted that appellant had not been fed since being taken into custody the previous day and that he would file a motion for a show cause order the following week. The trial court expressed concern that appellant may not have been fed, stated that appellant should be fed before being released, and indicated that it would determine whether to hold a hearing after appellant's counsel filed the motion to show cause and after the government responded to the motion. The trial court also stated, without objection from either party, that "I'm going to make some inquiries. . . to find out why that situation occurred."
Two months later, at a hearing on November 13, 1998, the government dismissed appellant's PINS case. At that hearing, appellant, through her trial counsel, finally presented a written motion asking the trial court to order DHS to show cause why it should not be held in contempt for failure to comply with the trial court's September 24, 1998 order that appellant be placed forthwith at Kenyon Youth Shelter House and, in addition, for failure to provide any food to appellant while she was in custody.[1] On November 24, 1998, the government filed its opposition, asserting that no basis existed for civil contempt because appellant was no longer in custody and, hence, DHS could not comply with any civil contempt order and further that appellant has suffered no quantifiable loss for contempt purposes. The government also invoked the absence of any express order with respect to the provision of food that could underlie a *939 contempt action and suggested that the dismissal of the PINS action ended the court's jurisdiction over any matters relating thereto. It asserted that, while other remedies might be open to appellant, civil contempt was not the appropriate form of action. The government's response did not address the factual assertions of appellant's motion.
The trial court then sent a letter dated January 19, 1999 to Todd Dillard of the United States Marshals Service asking why appellant was not fed while in custody. Copies of this letter were sent to appellant's trial counsel and to the government's counsel. Dillard replied to the trial court by letter,[2] noting that his records revealed no evidence that appellant went unfed while in the custody of the Marshals Service. On March 3, 1999, the trial court sent a letter to George Perkins of the Oak Hill Youth Center, attaching the letter from Dillard. The letter asked for a response from Oak Hill as to the alleged incident of failure to feed. Perkins replied to the trial court by letter on April 29, 1999, writing that appellant was provided with food at Oak Hill, but had refused to eat it.
On August 11, 1999, the trial court issued an order denying appellant's motion to show cause. With respect to the over-night Oak Hill stay, the trial court noted that when the court orders a juvenile placed in a youth shelter home, the juvenile is typically sent to Oak Hill so that DHS can determine whether a shelter house has space. Interpreting "forthwith" in its order as meaning "within a reasonable time under the circumstances, promptly and with reasonable dispatch," the trial court found no violation of its placement order.[3] Concerning the alleged failure to provide food to appellant, the trial court issued the following ruling, attaching as exhibits each of the letters and responses:[4]
The court undertook an investigation by sending letters to both the United States Marshals Service and to Oak Hill Youth Center to inquire about the Respondent's allegations. In response to the court's letter, Oak Hill Acting Superintendent George Perkins sent the court a copy of a page from an Oak Hill Log Book. The entry on this page, dated the morning of September 25, 1998, indicates that the Respondent refused to eat the food that she was offered for breakfast at Oak Hill. Although the United States Marshals Service had no specific entry regarding the Respondent, Mr. Todd Dillard of the United States Marshals Service informed the court that `[a]n investigation revealed that no unusual circumstances prevented the sandwiches from arriving [on September 25, 1998] as is customary, nor did any event cause the sandwiches to be delayed in being disseminated.'
Based on the Respondent's Motion, the Government's Response thereto, and the court's own investigation, the court finds no reason to convene a show cause hearing to require DHS to explain why Respondent was not fed while in custody of DHS. Accordingly, it is, this 11th day of August, 1999, ORDERED that the Respondent's motion that DHS show cause why Respondent was not fed while *940 in custody of DHS be and hereby is DENIED.
Appellant appeals from the trial court's denial of her motion, asserting that by not holding a hearing and by engaging in its own investigation, the trial court had denied her due process.

II. Analysis
The decision whether to hold a party in civil contempt is confided to the sound discretion of the trial judge, and will be reversed on appeal only upon a clear showing of abuse of discretion. See, e.g., In re Bryant, 542 A.2d 1216, 1220-21 (D.C. 1988). Unlike criminal contempt, which is designed to punish the contemnor and to vindicate the court,[5] civil contempt serves one of two purposes, either to enforce compliance with a court order or to compensate for losses sustained by reason of a party's non-compliance. See District of Columbia v. Group Ins. Admin., 633 A.2d 2, 12 & n. 5 (D.C.1993). Civil contempt is not a crime, and a civil contempt proceeding remains a part of the original cause. See D.D. v. M.T., 550 A.2d 37, 44 (D.C. 1988). When the underlying controversy giving rise to a civil contempt action is settled or is otherwise terminated, the contempt proceeding becomes moot insofar as it seeks to compel enforcement of a court order. See Gompers v. Buck's Stove & Range Co., 221 U.S. 418, 451-52, 31 S.Ct. 492, 55 L.Ed. 797 (1911).
Here, the government dismissed the PINS case against appellant on the same day that appellant filed her motion to show cause. Appellant's civil contempt motion as it was articulated lost any relevance to appellant with this dismissal, if not before.[6] The trial court, therefore, would have acted quite properly in denying at the outset appellant's motion for a hearing to show cause, see, e.g., In re Bryant, 542 A.2d at 1220-21, cf. In the Matter of an Inquiry into Allegations of Misconduct Against Juveniles Detained and Committed at Cedar Knoll Inst., Dep't of Human Res., 430 A.2d 1087, 1092 (D.C.1981), and appellant consequently suffered no prejudice in the ultimate disposition by the trial court of the contempt motion.
We turn now to appellant's assertion that the trial court went beyond its proper role of impartial magistrate when it initiated an investigation to determine whether appellant had been fed while in custody and relied on that investigation in denying the motion without a hearing. Appellant's standing to raise this complaint may be somewhat questionable, having raised no protest either when the trial court at the September 25 hearing indicated it would make some inquiries into the allegations or when, after the motion was filed, the trial court sent appellant's counsel a copy of its inquiry to the Marshals Service. Nonetheless, we will briefly address the issue because of its institutional importance.
*941 In common law adversarial jurisdictions, "`the development of the facts is a task primarily assigned to counsel.'" In re D.M., 771 A.2d 360, 369 (D.C.2001) (citations omitted).[7] "Under our system of laws, a judge is not an investigator; the investigative function belongs to the parties and their agents." Davis v. United States, 567 A.2d 36, 42 (D.C.1989).[8] "These principles are deeply embedded in the warp and woof of our law." In re A.R., supra note 8, 679 A.2d at 475.[9]
Undoubtedly the trial court intended to resolve, efficiently, the question of whether appellant had been fed while in shelter care, and such action might have been unexceptionable had it been done in some other manner or context. But, in this case, a party in litigation had filed a formal motion, and the trial court conducted its investigative actions while in the process of adjudicating that pending motion. The inquiry produced, as was intended, results that spoke directly to issues at the heart of the motion. As a result, the investigation and the trial court's reliance thereon must be viewed as an unwarranted intervention. See Davis, 567 A.2d at 41. In this case, however, we find the trial court's action to be harmless because, as already indicated, it was appropriate to deny the motion with respect to appellant in any event. Cf., e.g., In re W.T.L., 656 A.2d 1123, 1129-30 (D.C.1995) (finding ex parte communication harmless when judge alerts parties to ex parte information obtained about one party and explains its significance).
For the foregoing reasons, the trial court order appealed from is
Affirmed.
NOTES
[1]  The motion alleged not only that appellant had not been fed while in overnight custody, but also that appellant had not been fed following the end of the court hearing on September 25 and prior to her release, contrary to the oral instructions of the trial court at the hearing.
[2]  The letter bears the date of January 2, 1999, but obviously a numeral has been omitted.
[3]  Appellant does not challenge and we do not consider this portion of the trial court's order on appeal.
[4]  The trial court seems to have proceeded on the assumption that, while its order was not specific as to provision of food, such a requirement could be inferred in the order, violation of which was potentially subject to civil contempt. We do not address that issue.
[5]  Although appellant's motion does not indicate whether a civil or criminal contempt proceeding was contemplated, the government's response clearly interpreted the motion as one for civil contempt and appellant has not challenged that characterization. In fact, a criminal contempt proceeding would have implicated different procedures. See Super. Ct.Crim. R. 42(b); Smith v. United States, 677 A.2d 1022, 1029-30 (D.C.1996); In re Wiggins, 359 A.2d 579, 580-81 (D.C. 1976).
[6]  Appellant was not, either at the time her motion was made or at the time her motion was denied, being detained by DHS. Moreover, appellant, neither below nor on appeal, has alleged that she suffered a compensable loss for purposes of a civil contempt action. See United States v. United Mine Workers of America, 330 U.S. 258, 304 & nn. 80-81, 67 S.Ct. 677, 91 L.Ed. 884 (1947). Both facts illustrate the trial court's inability to fashion any relief sought by appellant that was applicable to her.
[7]  This case was somewhat similar to the present appeal in that it involved the denial of a motion asking the court to order an investigation. We there questioned the immediate appealability of such an order and a similar jurisdictional issue might be raised here. However, insofar as appellant's PINS case was concerned, the order was indeed the final action related thereto. In any event, we may assume jurisdiction under Kay v. Pick, 711 A.2d 1251, 1256 (D.C.1998).
[8]  We note, however, that, in the context of juvenile matters such as the instant action, we have suggested that a more active participation in the development of the facts may be permissible. See In re D.M., 771 A.2d at 369 (noting this possibility in dictum); In re A.R., 679 A.2d 470, 476 (D.C.1996) (when court acts in parens patriae role in child custody case, decision whether to interview child in chambers lies within judge's discretion). See also In re J.A., 601 A.2d 69, 76 (D.C.1991) (noting that, in juvenile cases, a judge must serve the best interests of the child, a goal that creates tension between finding and resolving relevant facts and presiding and appearing to preside impartially while doing so). Whatever the extent of any such allowable "more active participation," it does not encompass the events in a case like this where the judge's inquiries related to a formal motion pending before the court.
[9]  Also potentially implicated in such investigations is Canon 3(B)(7) of the District of Columbia Courts' Code of Judicial Conduct. which states in pertinent part: "A judge shall not initiate, permit, or consider ex parte communications, or consider other communications made to the judge outside the presence of the parties concerning a pending or impending proceeding . . . ." We need not address that issue here, but we do note that the trial court alerted the parties that he would be making an inquiry, that a copy of at least one of the inquiries was furnished to counsel at the time when made, and that copies of all the inquiries and responses were included as part of the ultimate order. The record does not indicate whether counsel were furnished contemporaneously with copies of any of the correspondence other than the trial court's letter to Marshal Dillard.
