In an action, inter alia, to recover damages for breach of contract and breach of fiduciary duty, and for declaratory relief with respect to the rights of the parties in certain escrow funds, the plaintiff appeals, as limited by her brief, from stated portions of an order of the Supreme Court, Westchester County (Burrows, J.), dated August 28, 1992, which, inter alia, granted those branches of the respondents’ motion which were to dismiss all causes of action against the defendants Vittoria & Parker and Steven Jon Levine, consolidated certain of the causes of action against the defendants William J. Lazich and Janice M. Lazich with a related action entitled Lazich v Lazich pending in the Supreme Court, Westchester County, under Index No. 6649/88, and, in effect, dismissed the remaining causes of action.
Ordered that the order is modified, on the law, by deleting the second and third decretal paragraphs thereof, providing for consolidation and, in effect, dismissing some of the causes of action stated by the plaintiff against the defendant Janice M. Lazich; as so modified, the order is affirmed insofar as appealed from, without costs or disbursements, and the matter is remitted to the Supreme Court, Westchester County, for a declaration of the rights of the parties to the proceeds of the sale of the former marital residence of the defendants William J. Lazich and Janice M. Lazich, which are held in escrow.
This appeal involves the dismissal of a complaint asserting several causes of action arising from the alleged breach of a stipulation concerning certain moneys from the proceeds of the sale of a former marital home of the defendants William J. Lazich and Janice M. Lazich that are being held in escrow. This action is separate but intimately related to a pending matrimonial action for divorce in the same court between the plaintiff’s son and her daughter-in-law (the defendants William J. Lazich and Janice M. Lazich, respectively). The plaintiff, Cecelia Lazich, after the related matrimonial action was commenced, obtained a lien on the marital home of William J. Lazich and Janice M. Lazich pursuant to a confession of judgment by her son, William J. Lazich, concerning a loan she allegedly made which allowed them to purchase the home. *527During a conference in the related matrimonial action, it was stipulated that the marital home would be sold and the proceeds placed in an escrow account. The plaintiff herein was a party to this stipulation and agreed to release her lien on the home and allow it to be sold on the condition that she would be given notice and opportunity to be heard before any disbursements were made from the escrow account. Further, the escrow account was to be maintained by the Westchester County Commissioner of Finance. The complaint herein alleges that proceeds from the sale of the marital residence were not remitted to the Westchester County Commissioner of Finance but were improperly held by Janice M. Lazich’s lawyers in the related matrimonial action (the defendants Vittoria & Parker [now Vittoria and Forsythe] and Steven Jon Levine) and that disbursements had been made without notice to the plaintiff and opportunity for her to be heard. Thus, the plaintiff commenced this plenary action to define and enforce the terms of the stipulation and to obtain damages for various alleged breaches of the stipulation. In addition, the plaintiff sought to have Justice Burrows, who is also presiding over the related matrimonial action, and his law secretary, recused. Upon motion by the defendants Vittoria & Parker, Steven Jon Levine, and Janice M. Lazich, the court dismissed all causes of action against Vittoria & Parker and Steven Jon Levine for failure to state a cause of action, limited the plaintiff’s causes of action against William J. Lazich and Janice M. Lazich, and consolidated those causes of action with the related matrimonial action.
Our review of the complaint reveals that it properly states several causes of action against Vittoria & Parker and Steven Jon Levine. Therefore, the complaint was improperly dismissed for failure to state a cause of action against those defendants. However, neither Vittoria & Parker nor Steven Jon Levine were properly served with process (see, CPLR 302 [a] [2]; 310). Since personal jurisdiction was never acquired over these defendants, the complaint was nevertheless properly dismissed insofar as it is asserted against them (see, Pesner v Fried, 166 AD2d 512; Broomes-Simon v Klebanow, 160 AD2d 973). Because William J. Lazich has not requested any relief on this appeal, we need only examine the causes of action alleged against Janice M. Lazich.
The bulk of the plaintiff’s claims against Janice M. Lazich rest on the validity and enforceability of a stipulation between the parties. A stipulation is essentially a contract and may be enforced as such (see, New York Bank for Sav. v Howard *528Cortlandt St., 106 AD2d 496). Where, as here, there is an oral stipulation made in "open court,” it is valid and binding and will not be set aside on facts less than needed to avoid a contract, e.g., fraud, collusion, mistake, accident, or some other ground of similar nature (see, Hallock v State of New York, 64 NY2d 224; Matter of O’Garro v New York State Dept. of Mental Hygiene, 46 NY2d 853; Matter of Dolgin Eldert Corp., 31 NY2d 1; Rivera v Triple M. Roofing Corp., 116 AD2d 561). Further, although a motion in the pending action is preferred, the terms of a stipulation may be enforced in a separate plenary action (see, Teitelbaum Holdings v Gold, 48 NY2d 51). Here, taking all the allegations as true (see, Sanders v Winship, 57 NY2d 391; Morone v Morone, 50 NY2d 481; Green v Leibowitz, 118 AD2d 756; Home Reporter v Brooklyn Spectator, 34 AD2d 956), the plaintiff has adequately alleged several causes of action against the defendant Janice M. Lazich.
Although declaratory relief will generally be denied when resort to another form of action will provide an adequate remedy (see, Matter of Morgenthau v Erlbaum, 59 NY2d 143, cert denied 464 US 993; Gaynor v Rockefeller, 15 NY2d 120; Woollard v Schaffer Stores Co., 272 NY 304), here, declaratory relief is warranted. Throughout her papers on appeal, the plaintiff argues that the stipulation required that the escrow fund not be depleted below the amount allegedly owed to her. However, although her attorney raised that issue at the stipulation conference in the matrimonial action, it is not an express term of the stipulation. Moreover, Justice Burrows has indicated that several other claims in the matrimonial action for the escrow funds might take precedence over the plaintiffs claims. Thus, there is a possibility that the escrow fund will be depleted before the plaintiff’s claim is adjudicated, and there are issues relating to the nature of the plaintiffs claim to the escrow money that may become academic if adjudication is delayed. Consequently, declaratory relief is warranted with respect to the rights of the parties to the escrow funds.
The plaintiff also alleges that Janice M. Lazich breached the express terms of the stipulation by failing to place the funds with the Westchester County Commissioner of Finance and by failing to give the plaintiff advance notice and an opportunity to be heard before disbursements were made of any of the escrow moneys. Janice M. Lazich notes that all disbursements from the escrow account were made pursuant to court orders in the related matrimonial action after motions on notice. *529However, although this Court, in the related matrimonial action (see, Lazich v Lazich, 189 AD2d 750), did indeed hold that the disbursements challenged here were made pursuant to court orders after motions on notice, we did not hold that notice was given to the plaintiff herein, who is not a party to that action. Thus, this assertion does not vitiate Janice M. Lazich’s duty pursuant to the stipulation to give the plaintiff notice of any application for disbursement of escrow funds. Further, although we note that the decision in the related matrimonial action also directed Vittoria & Parker, who had been holding the proceeds from the sale of the marital home in escrow, to remit the money to the Westchester County Commissioner of Finance as required by the terms of the stipulation, this too does not vitiate the possibility of damages arising from the failure to have done so in the first instance. Finally, contrary to the respondents’ assertion on appeal, the court, absent a finding of fraud, collusion, mistake, accident, or some other ground of similar nature, did not have the authority to change the terms of the stipulation and allow disbursements without notice, or to allow Vittoria & Parker or Steven Jon Levine to retain the escrow funds (see, Hallock v State of New York, 64 NY2d 224, supra).
The plaintiff further alleges that Janice M. Lazich was unjustly enriched by receiving child support, maintenance, and counsel fees payments made out of the funds held in escrow. Unjust enrichment, an equitable doctrine, occurs when a party receives a benefit, the retention of which would be unjust (see, Sharp v Kosmalski, 40 NY2d 119; Ptachewich v Ptachewich, 96 AD2d 582). Here, because the various parties’ rights to the escrow fund have not been established, disbursement of the funds before adjudication of such rights without notice to the plaintiff, although a breach of the stipulation, does not necessarily mean that unjust enrichment has occurred (e.g., the money disbursed could rightfully belong to Janice M. Lazich). However, the plaintiff alleges that the funds were not properly awarded and that the escrow account has been depleted below the amount the plaintiff is rightfully owed. This raises an issue of fact for trial. Further, although this Court, in Lazich v Lazich (supra), directed that certain interim counsel fees be returned because they were not properly documented, this does not prevent the possibility of unjust enrichment based on the remaining allegations. Therefore, the court acted improperly when it, in effect, dismissed certain of the causes of action asserted by the plaintiff against Janice M. Lazich.
*530In addition, although it appears that the instant action should be consolidated with the related matrimonial action, neither this Court nor the trial court has the authority to sua sponte order such relief (see, New York Annual Conference of Methodist Church v Nam Un Cho, 156 AD2d 511; Kobak v Schultz, 117 AD2d 714). Therefore, the court improperly ordered the causes of action against William J. Lazich and Janice M. Lazich consolidated with those of the related matrimonial action.
Finally, no facts indicate that either Justice Burrows or his law secretary should be recused (see, People v Gallagher, 158 AD2d 469; People v Fischer, 143 AD2d 1036; United States v Helmsley, 760 F Supp 338, affd 963d 1522) or that any party should be sanctioned (see, e.g., Miller v John A. Keeffe, P. C., 164 AD2d 933; Martin-Trigona v Capital Cities/ABC, 145 Misc 2d 405; Matter of Winters v Gould, 143 Misc 2d 44). Sullivan, J. P., Balletta, Ritter and Pizzuto, JJ., concur.