Order of the Supreme Court, New York County (Harold Baer, Jr., J.), entered on or about June 14, 1988, which denied defendant’s motion seeking, inter alia, to vacate a stipulation of settlement and directed a reference for the purpose of inquiry into the circumstances surrounding its execution, unanimously affirmed, without costs. Order of the same court, entered September 14, 1988, which denied defendant’s motion to resettle the order entered June 14, 1988, to set aside the stipulation and to grant those branches of defendant’s original motion as seek to disqualify plaintiff’s attorney from representing him during the evidentiary hearing on the motion to vacate the stipulation, to depose plaintiff, plaintiff’s attorney and defendant’s former attorney and to stay the hearing and trial pending the conclusion of the depositions, unanimously modified, on the law, without costs, and the motion granted to the extent of disqualifying plaintiff’s counsel from representing him before the Referee and, except as so modified, affirmed.
In the course of this action for divorce, the parties entered into a written stipulation which provided for the distribution of the personal marital property, including numerous works of art. The stipulation was subscribed by the parties and their attorneys and so ordered by the court. Subsequently, a dispute arose as to whether the agreement covered works of art *351created by the parties themselves during the course of their marriage. Defendant thereupon sought to set aside the agreement, claiming that she misunderstood its terms, that her attorney had relied upon a representation by plaintiffs attorney that she was not relinquishing her rights to the marital ark work and that the agreement is inequitable, unfair and unjust.
The Supreme Court declined to vacate the stipulation of settlement but directed a reference to determine the circumstances under which it was executed. The court specifically excluded from the scope of the hearing any consideration of the assets subject to the stipulation, an issue which it reserved until resumption of the trial. The court also declined to disqualify plaintiff’s counsel, reasoning that the hearing before the Special Referee is merely of a "collateral nature.” Neither order appealed from addresses the application to take depositions. However, because of the availability of discovery by order of the Referee pursuant to CPLR 4201, this issue is not raised by defendant upon this appeal.
Defendant argues that the stipulation must be set aside for failure to comply with the requirements of Domestic Relations Law. § 236 (B) (3) which provides, in pertinent part, "An agreement by the parties, made before or during the marriage, shall be valid and enforceable in a matrimonial action if such agreement is in writing, subscribed by the parties, and acknowledged or proven in the manner required to entitle a deed to be recorded.” Defendant cites cases decided by the Appellate Divisions of the Third and Fourth Departments which have invalidated settlement agreements which failed to comply with the statute (Giambattista v Giambattista, 89 AD2d 1057 [4th Dept]; Hanford v Hanford, 91 AD2d 829 [4th Dept]; Lischynsky v Lischynsky, 95 AD2d 111 [3d Dept]). Plaintiff relies on an alternate line of cases by the Second Department which does not require literal compliance with the Domestic Relations Law (Harrington v Harrington, 103 AD2d 356; Alexander v Alexander, 112 AD2d 121; Sontag v Sontag, 114 AD2d 892). In this department, the Supreme Court has held that the statute "should not be interpreted as proscribing an oral stipulation made in open court” pursuant to CPLR 2104 (Josephson v Josephson, 121 Mise 2d 572, 577).
It is our opinion that section 236 (B) (3) of the Domestic Relations Law applies only to agreements entered into outside the context of a pending judicial proceeding, such as antenuptial agreements. We do not construe the statute as restricting the ability of the parties to terminate litigation upon mutually *352agreeable terms especially where, as here, the court has exercised its oversight and so ordered the stipulation. Rather, the provisions of CPLR 2104 govern agreements between the parties to a lawsuit or their attorneys in regard to "any matter” in the action (see, Harrington v Harrington, 103 AD2d 356, 360-361, supra).
To hold otherwise ignores substantial precedent and violates "[t]he policy of our law to promote settlements” (Brown v Schneider, 32 AD2d 712, 713 [3d Dept], lv dismissed 25 NY2d 903). The Court of Appeals has observed that "courts have long favored and encouraged the fashioning of stipulations as a means of expediting and simplifying the resolution of disputes” (Mitchell v New York Hosp., 61 NY2d 208, 214, citing Salesian Socy. v Village of Ellenville, 41 NY2d 521, 525-526). The court has further stated: "Stipulations of settlement are favored by the courts and not lightly cast aside (see Matter of Galasso, 35 NY2d 319, 321). This is all the more so in the case of 'open court’ stipulations (Matter of Dolgin Eldert Corp., 31 NY2d 1, 10) within CPLR 2104, where strict enforcement not only serves the interest of efficient dispute resolution but also is essential to the management of court calendars and integrity of the litigation process” (Hallock v State of New York, 64 NY2d 224, 230). Generally, therefore,- a stipulation will only be set aside for good cause, " 'such as fraud, collusion, mistake, accident, or some other ground of the same nature’ ” (Matter of Frutiger, 29 NY2d 143, 150).
In upholding a separation agreement incorporating a property settlement, the Fourth Department ruled that a settlement "fairly executed after negotiation and full disclosure of all relevant facts” will not be set aside unless it is unconscionable (Martin v Martin, 74 AD2d 419, 423). The Fourth Department’s opinion in Giambattista v Giambattista (supra, at 1057) is not to the contrary, stating, "The record of these proceedings establishes that the stipulation was conditional and that the parties and the court did not intend it to be binding until formally executed by both parties”. However, in Hanford v Hanford (supra), a property settlement which was recited by counsel in open court and accepted, on the record, by the parties was denied effect for failure to comply with Domestic Relations Law § 236 (B) (3) although clearly within the operation of CPLR 2104. This holding and the holding of the Third Department in Lischynsky v Lischynsky (supra) which followed it are inconsistent with the rationale employed by the Fourth Department in Martin v Martin (supra) and with the policy expressed by the Court of Appeals in *353Mitchell v New York Hosp. (supra) and Hallock v State of New York (supra). We therefore decline to follow it and instead hold that a property settlement in conformance with CPLR 2104 need not comply with the formalities "required to entitle a deed to be recorded” as provided in Domestic Relations Law § 236 (B) (3).
Defendant also maintains that plaintiffs counsel should be disqualified from representing him during the hearing before the Referee on the ground that she will be called as a witness (Code of Professional Responsibility DR 5-102). Plaintiff argues that the provisions of the code are not binding on the issue of disqualification. Defendant cites our opinion in Tru-Bite Labs v Ashman (54 AD2d 345) in support of her position, and plaintiff cites the Court of Appeals decision in S & S Hotel Ventures Ltd. Partnership v 777 S. H. Corp. (69 NY2d 437) in support of his standpoint.
In S & S Hotel (supra), the Court of Appeals concluded that there was no finding that the attorney’s testimony was necessary and reversed the order disqualifying the plaintiff’s counsel. The court also stated that an application of this sort ought to be examined to determine that a real controversy exists because the right to an attorney of one’s own choosing "is a valued right and any restrictions must be carefully scrutinized” (69 NY2d 437, 443, supra). However, it is clear from the record that the IAS court has determined that a hearing is required to establish the circumstances under which the agreement was prepared. Therefore, Tru-Bite Labs v Ashman (supra) is instructive. In that case, in which the attorneys were directed to withdraw as trial counsel, we noted: "The circumstances underlying the agreement and the intention of the parties are in dispute and it is obvious that one of the members of the firm presently representing defendant, who also represented defendant during all of the negotiations leading to the separation agreement, will or ought to be called as a witness” (54 AD2d 345, 346, supra).
In the case under review, the court has directed a reference solely as to the circumstances under which the agreement was executed, with no provision for inquiry into the intention of the parties as to what assets are included within its operation. Therefore, the Referee will merely conduct a limited hearing into a collateral issue. Under these circumstances, the disqualification of plaintiff’s attorney should properly be limited to the hearing before the Referee, as defendant requests in her application. Plaintiff has not demonstrated his attorney’s "distinctive value” with respect to the conduct of this hearing *354and, therefore, the limited disqualification does not constitute a substantial hardship within the meaning of DR 5-101 (B) (4). Concur — Sullivan, J. P., Kassal, Rosenberger, Wallach and Rubin, JJ.