This is an appeal by the defendant from a judgment enforcing a previously negotiated consent decree. The plaintiffs, Connecticut Pharmaceutical Association, Stephen Prigodich, and Milton Smirnoff, on October 11,1979, filed a complaint seeking a writ of mandamus to compel the defendant, Anthony Milano, secretary of the office of policy and management of the state of Connecticut, to adopt a new fee schedule for the dispensing of Medicaid prescriptions in accordance with state and federal statutes and regulations. The defendant filed a motion to dismiss the complaint, alleging that the trial court had no jurisdiction to issue a writ of mandamus. After denial of the defendant’s *557motion to dismiss, and the filing of further appropriate pleadings, the trial court entered a consent decree on September 17,1980. The consent decree expressly provided that the court would retain continuing jurisdiction to assure compliance with its terms, and stipulated that compliance review might be obtained by either party upon the filing of a motion for review with the trial court. The plaintiffs thereafter filed both a motion for review and an application for a show cause order, upon which the trial court held a hearing. After finding that the defendant had not complied with the consent decree, the trial court rendered a judgment ordering the defendant to review the fee schedule to determine whether prevailing fees conformed to a designated fee survey. If new fees were required, they were ordered to be set retroactive to September 1, 1981.
The defendant, in his appeal from the judgment of noncompliance with the consent decree, raises two issues. He argues that the trial court generally lacked the power to mandate any action by the defendant, and in particular lacked the power to mandate that fees be set in accordance with a survey, even though the defendant had agreed, in the consent decree, to conduct such a survey. Furthermore, he argues that the trial court, in a mandamus action, lacked the power to make its order retroactive. We disagree with both of these contentions and find no error.
Assessment of the defendant’s claims must take account of the fact that the present appeal asks us to review a judgment rendered pursuant to a consent decree, rather than a judgment rendered in an action for a writ of mandamus. Insofar as the defendant’s first claim of error challenges the authority of the trial court to issue any writ of mandamus whatsoever against the defendant, that claim cannot survive the defendant’s voluntary acquiescence in the consent decree.
*558When parties to a lawsuit voluntarily enter into a consent decree that is entered on the court records, certain well established consequences follow. Although a consent judgment is a contract, rather than an adjudication on the merits; Owsiejko v. American Hardware Corporation, 137 Conn. 185, 187-88, 75 A.2d 404 (1950); such a judgment is as conclusive as if it had been rendered upon controverted facts. Bryan v. Reynolds, 143 Conn. 456, 460-61, 123 A.2d 192 (1956). A consent decree cannot be opened, even in the trial court, after expiration of the time for the filing of a motion to open judgment pursuant to General Statutes § 52-212a and Practice Book § 326,1 without a showing that the decree was obtained by fraud, duress, accident or mistake. Celanese Fiber v. Pic Yarns, Inc., 184 Conn. 461, 466, 440 A.2d 159 (1981); Kenworthy v. Kenworthy, 180 Conn. 129, 131, 429 A.2d 837 (1980); Sparaco v. Tenney, 175 Conn. 436, 437-38, 399 A.2d 1261 (1978); Bryan v. Reynolds, supra. Appeal from such a consent decree is, a fortiori, limited. In this case, the defendant filed neither a motion to open judgment in the trial court nor an appeal from the consent judgment in this court.
In the face of this unchallenged consent decree, the defendant is now foreclosed from reopening jurisdic*559tional claims that he unsuccessfully asserted in the trial court. Before the entry of the consent judgment, the defendant had filed a motion to dismiss, claiming that the trial court lacked jurisdiction to issue a writ of mandamus because: (1) the defendant was a public official exercising a discretionary power; and (2) the defendant’s conduct was immune from suit due to the sovereign immunity of the state of Connecticut. The merits of this motion to dismiss, which the trial court denied, cannot now be collaterally revived.
It is doubtful whether disagreement about the discretionary or mandatory nature of the defendant’s duties implicates a court’s subject matter jurisdiction, especially when it is recognized that mandamus will lie, even if the exercise of an official’s duty involves discretion, so long as the existence of the duty is ministerial. Chamber of Commerce of Greater Waterbury, Inc. v. Murphy, 179 Conn. 712, 718-19, 427 A.2d 866 (1980); State ex rel. Golembeske v. White, 168 Conn. 278, 284, 362 A.2d 1354 (1975); State ex rel. Foote v. Bartholomew, 103 Conn. 607, 615, 132 A. 30 (1925). A trial court that has the competency to adjudicate what duties can be compelled by mandamus has subject matter jurisdiction. State v. Malkowski, 189 Conn. 101, 105-106, 454 A.2d 275 (1983); Monroe v. Monroe, 177 Conn. 173, 185, 413 A.2d 819, appeal dismissed, 444 U.S. 801, 100 S. Ct. 20, 62 L. Ed. 2d 14 (1979); 1 Stephenson, Conn. Civ. Proc. (2d Ed. 1970) § 3b; 1 Restatement (Second), Judgments § 11 (1982).
By contrast, the defendant’s second claim, that sovereign immunity precluded judicial intervention, arguably may implicate subject matter jurisdiction.2 That *560claim could have been pursued on a direct appeal from the consent judgment. The fact that a direct jurisdictional challenge might then have been appropriate is not, however, sufficient to vindicate a subsequent collateral attack upon the consent judgment, particularly when the issue of subject matter jurisdiction was actually litigated in the original action. We adhere to our previous holding that a party cannot belatedly contest subject matter jurisdiction when he “was fully aware of the consequences of the [decree] and had the opportunity to fully litigate the question of jurisdiction in the original action, but, by stipulation, agreed without reservation to the terms of the orders which he now challenges.” Vogel v. Vogel, 178 Conn. 358, 363, 422 A.2d 271 (1979); Monroe v. Monroe, supra, 178; James & Hazard, Civil Procedure (2d Ed. 1977) § 13.16, pp. 695-96; 1 Restatement (Second), Judgments § 12, esp. comment c (1982).
We must turn then to see whether the particular orders of the trial court, pursuant to the consent decree, are substantively, although not jurisdictionally, flawed. The defendant claims that his agreement, in the con*561sent decree, to set appropriate new fees did not give the court the power to mandate setting a particular fee, nor to set a fee by a particular date, nor, when setting a fee, to make it retroactive to a particular date.
Evaluation of these claims requires examination of the terms of the consent decree and of the trial court’s findings with regard to the defendant’s compliance with the consent decree. The consent decree, which was filed on September 17, 1980, required the defendant to undertake the following: (1) to set a new professional fee for providers of Medicaid pharmaceutical service; (2) to commission a new survey to determine the cost of pharmacy operations, to be completed within seven and one-half months of the date of the consent decree; (3) to review the professional fee on the basis of the survey and, in the event of a discrepancy, to set a new fee in accordance with the survey and applicable state and federal statutes and regulations; and (4) to set all future professional fees in accordance with applicable state and federal statutes and regulations. The fifth paragraph of the consent decree acknowledged that the trial court would retain continuing jurisdiction to assure compliance with the decree. The defendant concededly complied with his first undertaking by setting a new professional fee on September 17,1980, retroactive to September 15,1980.3 The defendant also complied with his second undertaking by contracting for a survey by Pilgrim Health Applications, Inc., which was submitted to the defendant on June 30,1981.4 The defendant, in accordance with his third undertaking, did thereupon *562review the findings of the Pilgrim survey, which indicated that, in contrast to the existing fee of $2.77, a minimum new fee of $3.11 would be appropriate. The defendant has never questioned the accuracy of the Pilgrim survey, and initially approved the setting of a new $3.11 professional fee.* 5 The defendant subsequently decided, however, that no new fee schedule for professional fees would be implemented without the simultaneous implementation of a new program designed to adjust reimbursement for the underlying cost of the drugs themselves.6 In response to the plaintiffs’ show cause order, after a full hearing, the trial court found that the defendant’s linkage of professional fees with the cost of pharmaceutical supplies constituted noncompliance with the terms of the consent decree.
The defendant’s appeal has not assigned as error the trial court’s finding that he has failed to comply with the consent decree. For our purposes, it is therefore established that the Pilgrim survey reasonably determined the cost of pharmaceutical services and that such services, in the Medicaid program, are to be reimbursed as an item separate from the cost of the underlying pharmaceuticals. All that the defendant contests is the trial court’s remedial order which specifies: “The defendant is ordered to review the professional fees for providers of pharmaceutical services and supplies pursuant to the public welfare program, commonly known as Medicaid (Title XIX); and if the aforesaid survey of Pilgrim Health Applications, Inc., indicates that the existing fees are not in accord with the results of such survey, the defendant is ordered to set new fees by January 1,1982, such fees to be retroactive to Sep*563tember 1,1981.”7 As a result of the trial court’s order, the defendant did in fact set a new fee in accordance with the Pilgrim survey, effective January 1,1982. That action makes moot any further claim of error except with regard to the order’s retroactivity.8
The defendant argues that the trial court lacked the power to order a retroactive adjustment of the plaintiff’s professional fee because he had no duty to take remedial action prior to the court’s mandamus order. Furthermore, the court’s decree that the new fee is to be set retroactively, according to the defendant, constitutes the award of money damages which are not authorized in an action for mandamus. These arguments ignore the relationship between the trial court’s order and the consent decree. Whatever merits the defendant’s claims might have had in an ordinary action for mandamus, they cannot circumscribe the trial court’s power to fashion a remedy appropriate to the vindication of a prior consent judgment. The defendant’s duty to set a new professional fee arose from the consent decree and not from the court’s judgment of November 17,1981, which only sought to enforce duties previously undertaken. By the terms of the consent decree, the defendant was obligated to take reasonable action within a reasonable time following completion of the survey on June 29, 1981. The trial court properly concluded that compliance with the decree required a response no later than September 1, 1981. Having found noncornpliance, the court, in the exercise of its equitable powers, necessarily had the authority to fashion whatever orders were required to protect the *564integrity of the original consent judgment. See Koizim v. Koizim, 181 Conn. 492, 499, 435 A.2d 1030 (1980). We find no abuse of the court’s powers in this case.
There is no error.
In this opinion the other judges concurred.
“[General Statutes] Sec. 52-212a. civil judgment or decree reopened or SET aside within pour months only. Unless otherwise provided by law and except in such cases in which the court has continuing jurisdiction, a civil judgment or decree rendered in the superior court may not be opened or set aside unless a motion to open or set aside is filed within four months following the date on which it was rendered or passed. The parties may waive the provisions of this section or otherwise submit to the jurisdiction of the court.”
“[Practice Book] Sec. 326. setting aside or opening judgments
Unless otherwise provided by law and except in such cases in which the court has continuing jurisdiction, any civil judgment or decree rendered in the superior court may not be opened or set aside unless a motion to open or set aside is filed within four months succeeding the date on which it was rendered or passed. The parties may waive the provisions of this section or otherwise submit to the jurisdiction of the court.”
We have never clearly indicated whether a claim of sovereign immunity involves subject matter jurisdiction or in personam jurisdiction. We have repeatedly held that sovereign immunity can be waived only by appropriate legislative action, and that such legislative waiver must be clearly *560demonstrated by express terms or necessary implication. Berger, Lehman Associates, Inc. v. State, 178 Conn. 352, 356, 422 A.2d 268 (1979); Hirschfeld v. Commission on Claims, 172 Conn. 603, 606-607, 376 A.2d 71 (1977); Spring v. Constantino, 168 Conn. 563, 570-71, 362 A.2d 871 (1975). But see Gauvin v. New Haven, 187 Conn. 180, 184-85, 445 A.2d 1 (1982) (governmental immunity ordinarily must be pleaded as a special defense). In other jurisdictions, courts have differed as to whether sovereign immunity is a matter of subject matter or personal jurisdiction. See Kirk v. Kennedy, 231 So. 2d 246, 248 (Fla. App. 1970) (subject matter); Colvin v. United States, 153 Ga. App. 874, 875, 267 S.E.2d 297 (1980) (subject matter); American Federation of State, City & Municipal Employees v. Giordano, 114 Ill. App. 3d 142, 448 N.E.2d 269, 272 (1983) (subject matter); Hunt v. State Highway Commissioner, 350 Mich. 309, 320-21, 86 N.W.2d 345 (1957) (personal); Teachy v. Coble Dairies, Inc., 306 N.C. 324, 327, 293 S.E.2d 182 (1982) (noting the controversy); Lister v. Board of Regents, 72 Wis. 2d 282, 291, 240 N.W.2d 610 (1976) (personal). In the present circumstances, we need not resolve this controversy.
In a motion for review filed with the trial court on December 5, 1980, the plaintiffs contested the adequacy of this new professional fee, but that motion has not been pressed and the trial court made no findings with respect to the first undertaking.
The plaintiffs have, by their failure to make a timely objection, waived any claim that the belated submission of the Pilgrim survey violated the terms of the consent decree.
The deputy secretary of the office of policy and management approved a fee schedule consistent with the Pilgrim survey on August 31, 1981.
The deputy secretary of the office of policy and management revoked the new fee schedule on September 23, 1981.
The plaintiffs’ application for an order to show cause why the defendant should not be compelled to implement the Pilgrim survey, which also sought to hold the defendant in contempt, was filed on August 11, 1981.
At oral argument, counsel for the defendant conceded that “we have no argument and we are not appealing the question of the correctness of the fee after January 1, 1982.”