Robert D. Herrick filed a complaint seeking review of a final agency action denying him retirement benefits, but he failed to name the proper party defendant, the Contributory Retirement Appeal Board (CRAB). By the time he moved to amend his complaint to add CRAB, the time limit for filing a complaint pursuant to G. L. c. 30A, § 14(1), had expired. In this case, we decide that his failure to initially name CRAB is not fatal, and that the rules governing the amendment of pleadings may be invoked to save Herrick’s otherwise timely G. L. c. 30A appeal.
*188Background. Herrick unsuccessfully attempted to secure superannuation retirement benefits, first applying to the Essex regional retirement board (board) pursuant to G. L. c. 32, § 5.1 Based on findings of forfeiture under G. L. c. 32, the board denied his application on June 27, 2003. The denial was subsequently affirmed by CRAB. CRAB issued its decision on February 18, 2005, and Herrick received notice thereof on February 23, 2005.
On March 24, 2005, Herrick sought review of the denial of retirement benefits by filing a complaint in Superior Court pursuant to G. L. c. 30A, § 14. Though CRAB was referenced by name four times in the body of Herrick’s eighteen paragraph complaint, the board was captioned as the sole defendant and was the only party served. When the board answered Herrick’s complaint, it did not raise, as an affirmative defense, Herrick’s failure to name CRAB. However, on July 19, 2005,2 *the board moved to dismiss Herrick’s complaint for failure to name CRAB as an indispensable party. On August 1, 2005, Herrick moved, pursuant to Mass.R.Civ.P. 20(a),3 365 Mass. 766 (1974), to add CRAB as a party defendant. A judge of the Superior Court denied Herrick’s motion on September 1, 2005, finding the request futile because Herrick had “not complied with the necessary time requirement of G. L. c. 30A.”4 ***The board’s motion to dismiss was subsequently allowed by a different judge on October 4, 2005, “for failure to name an indispensable party.” Herrick appeals from the judgment of dismissal.
Discussion. Herrick does not dispute that CRAB is a necessary party, and the proper “defendant,” to his G. L. c. 30A appeal. However, he characterizes his failure to name CRAB as *189only a failure of notice, and asserts that CRAB was indeed the subject of his timely-filed complaint. Herrick therefore argues that at the time of his motion on August 1, 2005, CRAB was subject to being added as a defendant under rule 19. The board responds that the thirty-day time limit for seeking judicial review of administrative decisions is jurisdictional, and that Herrick’s failure to name the proper defendant within thirty days renders the Superior Court without jurisdiction. Thus, the board argues, because Herrick failed to name the proper defendant, his timely filing of the complaint does not overcome the jurisdictional defect.
Both parties’ articulations of the matter fail to address the issue raised by the judgment of dismissal. Namely, given our rules regarding the amendment and supplementing of complaints, and recognizing that the thirty-day time limit for filing complaints pursuant to G. L. c. 30A, § 14(1), can be termed jurisdictional, see Friedman v. Board of Registration in Med., 414 Mass. 663, 665-666 (1993), does the plaintiff’s complaint fail because, though filed within the time mandated by statute, it did not name the proper party defendant, and named an improper party?5 Or alternatively, given the plaintiff’s act of timely filing a complaint naming the proper defendant multiple times therein, did the judge have discretionary authority to allow the amendment?6
It appears settled that complaints seeking judicial review of final agency actions must be filed within thirty days of receiving notice of the agency’s decision, see G. L. c. 30A, § 14(1), *190and that the thirty-day time requirement articulated in G. L. c. 30A, § 14(1), may be described as a defect in the nature of jurisdiction. See, e.g., Schulte v. Director of the Div. of Employment Security, 369 Mass. 74, 79 (1975) (“Some errors or omissions are seen on their face to be so repugnant to the procedural scheme ... as to call for dismissal of the appeal. A prime example is attempted institution of an appeal seeking judicial review of an administrative decision after expiration of the period limited by a statute or rule”); Flynn v. Contributory Retirement Appeal Bd., 17 Mass. App. Ct. 668, 669 (1984) (“the thirty-day limitation upon the filing of actions seeking review of administrative agency action is jurisdictional in nature and, hence, not susceptible to extension except in the limited fashion provided for in § 14[1]”). With extremely rare exceptians not relevant here, failure to timely file is thus typically an absolute bar to a plaintiff’s ability to obtain judicial review of a final agency action. See, e.g., Friedman v. Board of Registratian in Med., supra.
We hold, however, that Herrick succeeded in the timely filing of his complaint, and did so notwithstanding his failure to name the proper defendant. The Commonwealth’s “liberal” rules governing the amendment and relation back of pleadings, see, e.g., McLaughlin v. West End St. Ry., 186 Mass. 150 (1904); Aker v. Pearson, 7 Mass. App. Ct. 552, 554 (1979), may permit Herrick to cure his error and obviate any negatively dispositive consequences, so that he may sustain his action. Pursuant to G. L. c. 231, § 51, inserted by St. 1988, c. 141, § 1:
“In all civil proceedings, the court may at any time, allow amendments adding a party, discontinuing as to a party or changing the form of the action, and may allow any other amendment in matter of form or substance in any process, pleading or proceeding, which may enable the plaintiff to sustain the action for the cause or for recovery for the injury for which the action was intended to be brought, or enable the defendant to make a legal defense. Any amendment allowed pursuant to this section or pursuant to the Massachusetts Rules of Civil Procedure shall relate to the original pleading.”
Relatedly, Mass.R.Civ.P. 15(a), 365 Mass. 761 (1974), provides *191that an amendment such as that sought by Herrick may be obtained “by leave of court. . . and leave shall be freely given when justice so requires,” and Mass.R.Civ.P. 15(c), 365 Mass. 762 (1974), continues: “Whenever the claim or defense asserted in the amended pleading arose out of the conduct, transaction, or occurrence set forth or attempted to be set forth in the original pleading, the amendment (including an amendment changing a party) relates back to the original pleading.”
This “liberal approach to the amendment of pleadings, and their retrospective effect, has its theoretical roots in the idea that if an action was timely brought at the outset, every consideration ought to be given an amendment which would prevent the plaintiff’s claim from being lost if an amendment were not allowed.” Aker v. Pearson, supra. See National Lumber Co. v. LeFrancois Constr. Corp., 430 Mass. 663, 671 (2000), S.C., 440 Mass. 723 (2004) (“Massachusetts practice is more liberal than other jurisdictions in allowing amendments adding or substituting defendants after expiration of a period of limitations”). Therefore, even if the statute of limitations has expired, in the court’s discretion a plaintiff may be permitted to substitute a new defendant for the one named in the original complaint. See Eaton v. Walker, 244 Mass. 23, 29 (1923); Wadsworth v. Boston Gas Co., 352 Mass. 86, 89 (1967).7 Cf. Ramirez v. Graham, 64 Mass. App. Ct. 573, 577 (2005) (rule governing relation back of amendments “applies notwithstanding the fact that a new complaint against the proposed additional defendant would be time-barred”). This rule goes so far as to permit the substitution of a solitary defendant. See Peterson v. Cadogan, 313 Mass. 133, 134 (1943) (“[i]t is settled that an amendment may be allowed, substituting one sole defendant for another”). See also, e.g., McLaughlin v. West End St. Ry., supra at 151 (when plaintiff seeks to substitute one sole defendant for another after expiration of statute of limitations, “the fact that a claim would be lost if an amendment was not allowed has often been considered an additional reason for allowing one . . .”). That *192an original action against the substituted defendant would be precluded by expiration of the statute of limitations “does not prevent the allowance of the amendment, and may furnish a reason for it.” Peterson v. Cadogan, supra.
Therefore, pursuant to G. L. c. 231, § 51; Mass.R.Civ.P. 15(c); and the case law, the judge below was not required by the thirty-day requirement of G. L. c. 30A, § 14(1), to deny Herrick’s motion to add CRAB as a party defendant. Indeed, the cases suggest that the extant policy favors allowing amendments. See Castellucci v. United States Fid. & Guar. Co., 372 Mass. 288, 289 (1977); Christopher v. Duffy, 28 Mass. App. Ct. 780, 783 (1990). A judge, exercising discretion, could deny the motion “based upon considerations of unjust delay, bad faith, or undue prejudice.” Srebnick v. Lo-Law Transit Mgmt., 29 Mass. App. Ct. 45, 50 (1990). “But a ruling that the court has no power to allow an amendment, when in truth the allowance is discretionary, is an error of law that can be corrected . . . .” Peterson v. Cadogan, supra at 134-135.
The instant situation is markedly different from that in Ramirez v. Graham, supra at 580, where we held that the plaintiff’s “inability to obtain relief against the original defendant [was] a sufficient ground for denying leave to amend.” While Herrick’s naming of the board rather than CRAB was an omission, we see no suggestion that he acted in bad faith, with an awareness that he could not recover against the board, or with the purpose of treating the board as “merely a ‘stalking horse’ ... to initiate an action against others that would otherwise be time-barred.” Id. at 579, quoting from Christopher v. Duffy, supra at 785. In short, we see no evidence here of the type of “manipulation of the system” that concerned us in Ramirez v. Graham, supra at 580.
On the facts and circumstances of this case, we therefore hold that Herrick’s filing of a complaint within the thirty-day time limit set forth by G. L. c. 30A, § 14(1), which contained ample references to CRAB, while imperfect, was adequate compliance with the statute. The judge, in her discretion, could therefore permit Herrick to amend his complaint, and her determination that the court was without such authority was thus error. Because the dismissal of Herrick’s complaint relied *193upon the earlier action denying his motion to amend, it was error to dismiss. The judgment is reversed, and the case is remanded for further proceedings consistent with this opinion.
So ordered.
General Laws c. 32, § 5, articulates the conditions for allowance of superannuation retirement benefits for civil service employees.
Herrick’s brief states that the motion to dismiss was filed on August 15, 2005. That date was apparently listed in error.
Herrick’s brief to this court erroneously states that his motion to join CRAB was pursuant to Mass.R.Civ.P. 19, 365 Mass. 765 (1974), regarding joinder of persons needed for just adjudication. However, the motion recites that it is pursuant to Mass.R.Civ.P. 20(a), regarding permissive joinder.
Pursuant to G. L. c. 30A, § 14(1), as amended by St. 1976, c. 411, § 1, “ [proceedings for judicial review of an agency decision shall ... be commenced in the court within thirty days after receipt of notice of the final decision of the agency . . . .”
Our analysis somewhat assumes that the Essex regional retirement board is not a proper party defendant in this action. The board’s status as a proper or improper party does not alter the ultimate disposition of the case, and we therefore need not decide the issue here. Nonetheless, we state the rationale for our assumption as follows. County retirement boards are not agencies as defined by G. L. c. 30A, § 1(2). Actions before them are thus not adjudicatory proceedings subject to judicial review under G. L. c. 30A, § 14. See Buteau v. Norfolk County Retirement Bd., 8 Mass. App. Ct. 391, 392 (1979) (“[a] county body is thus no more an ‘agency’ subject to G. L. c. 30A than a city or town body”).
We read the first judge’s ruling as indicating her belief that she was without discretionary authority to allow the amendment. The dismissal ordered by the second judge followed appropriately, but only if the first judge’s ruling was correct.
As the court observed, “[w]e discern no difference in principle between permitting a plaintiff to substitute a defendant and permitting a plaintiff to add a defendant. . . . The effect in both cases is that a different defendant is called upon to defend the action.” Wadsworth v. Boston Gas Co., supra (citations omitted).