concurring in part and dissenting in part. I agree that there is no error in the defendants’ appeal. As to the plaintiff’s cross appeal, however, I would find error. The plaintiff has established its entitlement to additional attorney’s fees incurred in its defense of Yonkers’ countersuit for an alleged breach of the subcontract upon which the plaintiff had initially brought suit under General Statutes § 49-42 against the two sureties on the payment bond furnished under the provisions of General Statutes § 49-41.
On May 20, 1976, Yonkers entered into a contract with the state of Connecticut, project No. 96-114,115, Newtown-Southbury, Interstate Route 84, for the construction of certain highways, bridges and structures. Under the requirements of General Statutes § 49-41 (a), *263Reliance and General furnished a bond to the state as sureties for payment by Yonkers “for all materials and labor used or employed in the execution of such contract, to the extent as required by the General Statutes of Connecticut.” By a subcontract with Yonkers, Ernst agreed to fabricate, deliver and erect structural steel for four bridges in accordance with the plans and specifications of the project for $3,220,000.
The necessary steel was fabricated, furnished and erected by the plaintiff in accordance with its subcontract. Upon the completion of the highway by Yonkers under its prime contract with the state it was paid in full. Of the amount received from the state, Yonkers paid Ernst only $2,928,477.75. When the balance due Ernst was refused, it then proceeded to comply with the conditions of General Statutes § 49-41a, first seeking payment, and thereafter demanding the deposit of the amount due in an interest-bearing escrow account. After Yonkers ignored these statutory demands, Ernst brought suit against the two sureties on their payment bonds pursuant to § 49-42, seeking interest and attorney’s fees under § 49-41a in addition to the contractual sums due. In their answer, Reliance and General sought a setoff and recoupment for damages caused to Yonkers by Ernst’s alleged breach of its subcontract. By Ernst’s reply to these affirmative allegations, the issues in this case were closed on May 22, 1980.
More than two years later, Yonkers reopened the issues by successfully moving to be added as a party defendant1 “so that it may seek affirmative relief against the Plaintiff for breach of the contract which is the subject matter of this cause of action and so that complete relief may be afforded to all the parties.” Thereafter Yonkers filed a “Third Party Cross-*264Complaint”2 seeking damages from Ernst for breach of the subcontract. These alleged damages consisted of the claim for setoff and recoupment previously made by Reliance and General, and in addition, a new claim for damages in the amount of $56,158.19 for work, labor and materials which Ernst failed, omitted or refused to provide. Ernst denied these substantive allegations. It also filed a substituted complaint against all three defendants. In the first count, it sought recovery of the balance due under the subcontract, together with interest and attorney’s fees pursuant to § 49-41a. The second and third counts sought recovery from the sureties, Reliance and General, respectively. In their answers, the defendants denied a breach of the subcontract by Yonkers. In addition, the defendants Reliance and General repeated their previous setoff and recoupment claims, but this time their allegations were expanded to those of Yonkers’ “Third Party Cross-Complaint.” The pleadings were again closed on December 12,1983, and the parties went to trial thereafter on the affirmative issues raised by the plaintiff’s substituted complaint, by Yonkers’ “Third Party Cross-Complaint,” and by the sureties’ setoff and recoupment.
At trial the plaintiff claimed that the steel was delivered and erected within the agreement of the parties. The defendant Yonkers maintained that as a result of late delivery of steel and the late erection of the bridges, the entire project was delayed with a loss of profits which it sought to recover. At the request of the court, *265the trial was bifurcated. The first segment of the trial considered the issue of delivery of the steel by Ernst. Upon the completion of this evidence, the court found that the plaintiff “did in fact perform its contractual obligation within the terms of the contract. . . . [Therefore,] the defendant [was] not justified in withholding the disputed sums.”
In the second phase of the trial, the court heard evidence on the outstanding issues regarding the plaintiffs damages. Upon the conclusion of its hearing, the court found that the plaintiff was entitled to recover from Yonkers the following sums: (1) $343,387.15 balance due on the contract as of April 23, 1979, after credits to the defendant of $6000 for splices and $4158 for back charges, with interest at the agreed contract rate of 1.5 percent per month; (2) $10,394.88 for extra work, with interest at the statutory rate under § 49-41a of 1 percent per month; and (3) attorney’s fees under § 49-41a “of 20 percent of the sums found due as of the date of this judgment.” Without furnishing any reason or explanation, the court peremptorily ruled as follows: “No award is, or will be, made for attorney’s fees that were incurred as the result of the defendants’ counterclaim.” The plaintiff has appealed from the court’s denial of its attorney’s fees incurred in the defense of Yonkers’ counterclaim. I would find error.
At the outset, it should be noted that the trial court failed to render judgment on Yonkers’ counterclaim. Neither the memoranda of decision on liability and damages, nor the judgment file prepared by the clerk, show the rendition of a judgment by the court on the counterclaim. A judgment is in fact rendered whenever the trial judge announces his decision in court or out of court, orally or in writing, in any cause of action. The writing out of the judgment, in the form of a judgment file to be recorded, is a matter of subsequent clerical action. Bogaert v. Zoning Board of Appeals, 162 Conn. *266532, 535 n.2, 294 A.2d 573 (1972); Bulkeley’s Appeal, 76 Conn. 454, 457-78, 57 A. 112 (1904); LaPre v. Nibo Films, Ltd., 10 Conn. App. 669, 673 n.4, 525 A.2d 140 (1987). Implicit in the trial court’s memoranda, and the findings and conclusions contained in them, however, is an unexpressed judgment for the plaintiff on Yonkers’ counterclaim. The parties to this appeal have proceeded on that assumption, and for the purposes of this review we may also hold to that course.3
Although the trial court gave no reason, factual or legal, for its denial of an award for attorney’s fees incurred by the plaintiff in its defense of Yonkers’ counterclaim, the majority opinion finds a legal basis for the trial court’s ruling. The majority opinion holds that § 49-41a contains no provision authorizing an award of counsel fees for defending a counterclaim. That is a myopic view of the statute. Section 49-41a (b) provides that “[i]n the event that such general contractor or subcontractor refuses to place such funds in escrow, and the party making a claim against it under this section is found to have substantially performed its work in accordance with the terms of its employment in any arbitration or litigation to determine the validity of such claim, then such general contractor or subcontractor shall pay the attorney’s fees of such party.”
Attorney’s fees in the context of § 49-41a include all legal fees necessarily incurred in the collection of the contractual payment. All of the enumerated conditions have been met here. The plaintiff, therefore, is entitled to full reimbursement of counsel fees incurred as a consequence of Yonkers’ refusal to pay the contract balance because of its disproven claim that Ernst breached their subcontract, including the fees expended in the *267defense of the counterclaim filed to defeat, or at least to minimize, any award of contractual damages to it. The defense of the counterclaim was a necessary component of the action brought by Ernst under § 49-41a to recover for its “labor performed or materials furnished” to “the contractor and paid by the state.” This defense being an integral part of its statutory suit “to determine the validity of such claim, then [the] general contractor . . . shall pay the attorney’s fees of such party.”
Ernst initially brought this action against the two sureties on their payment bonds furnished to the state by Yonkers under the requirements of § 49-41. This suit was authorized by § 49-42. The pleadings in that case were closed on May 22, 1980. After more than two years, Yonkers reopened the case for the purpose of bringing a retaliatory action to defeat, in whole or in part, the plaintiff’s claim for the contract balance due. As stated in its motion on October 8, 1982, it sought to “be made a party Defendant so that it may seek affirmative relief against the Plaintiff for breach of the contract which is the subject matter of this cause of action and so that complete relief may be afforded to all the parties.” That it sought to achieve after it was allowed to enter the case by its “Cross-Complaint” or counterclaim. The counterclaim became an integral part of Ernst’s suit to recover the balance due on its contract together with interest and attorney’s fees under the provisions of § 49-41a. Therefore, it should have been awarded attorney’s fees for all necessary services furnished in its successful defense of the counterclaim.
The majority opinion states that since § 49-41a contains no provision which authorizes an award of counsel fees for defending a counterclaim, the trial court was correct in declining to make such an award. Such a deductive conclusion begs the question. Section *26849-41a (b) provides that “[i]n the event that such general contractor . . . refuses to place such funds in escrow, and the party making a claim against it under this section is found to have substantially performed its work in accordance with the terms of its employment in any arbitration or litigation to determine the validity of such claim, then such contractor . . . shall pay the attorney’s fees of such party. ” (Emphasis added.) There is nothing equivocal, uncertain or vague about this provision, its meaning or its application.
Yonkers at its risk refused to place the contested amount in an escrow account after demand by Ernst. After the plaintiff commenced this action, Yonkers supported this risk by bringing its counterclaim to counteract, and even counterattack, the plaintiffs collection of its contractual balance. The defense of Yonkers’ counterclaim then became a necessary step in establishing the validity of the plaintiff’s claim and the collection of interest and attorney’s fees pursuant to the provisions of § 49-41a.
“Under our rules of practice, a counterclaim, if proper, is an independent action. See Practice Book §§ 116, 168, 169; Hanson Development Co. v. East Great Plains Shopping Center, Inc., 195 Conn. 60, 63, 485 A.2d 1296 (1985); see also Schurman v. Schurman, 188 Conn. 268, 270, 449 A.2d 169 (1982). It has been defined ás “a cause of action existing in favor of a defendant against a plaintiff which a defendant pleads to diminish, defeat or otherwise affect a plaintiff’s claim and also allows a recovery by the defendant.’ 1 Stephenson, Conn. Civ. Proc. (2d Ed. 1982 Sup.) § 129b.” Home Oil Co. v. Todd, 195 Conn. 333, 341, 487 A.2d 1095 (1985). Yonkers’ counterclaim was belatedly injected into this cause of action “to diminish, defeat or otherwise affect the plaintiff’s claim” for recovery of the balance due it from Yonkers and was, therefore, an integral part *269of the “litigation to determine the validity of such claim” under the provisions and entitlements of § 49-41a.
The trial court found that the plaintiff substantially performed its contract and, therefore, had a valid claim. This conclusion was reached by the trial court in this single action after the combined litigation of the plaintiffs substituted complaint, the sureties’ setoff and recoupment, and Yonkers’ long delayed counterclaim. To establish the validity of its claim under the requirements of § 49-41a, the plaintiff had to prevail on the three affirmative issues raised by the plaintiff and the defendants in their respective pleadings. That, the plaintiff did in obtaining judgment on its complaint. Therefore, under the provisions of § 49-41a it is entitled to all attorney’s fees incurred in prosecuting and defending all phases of the “litigation to determine the validity of such claim.”
The majority opinion states that “[bjecause the issues are intertwined, it would have been virtually impossible to apportion the work of counsel between the prosecution of the complaint and the defense of the counterclaim.” The evidence shows otherwise. There was testimony that Ernst had an agreement with its counsel in Buffalo, New York, to pay a collection fee in the amount of 20 percent of the sum recovered on its contract balance due from Yonkers. Ernst also agreed to pay its attorneys at an hourly rate for legal work necessary for the defense of any counterclaim or affirmative defenses that might be pleaded by the defendants. The reasonableness and amount of such fees were left to the determination of the trial court. In addition, disbursements and expenditures were properly to be reimbursed. This evidence of the retainer agreement of Ernst with its attorneys was for an unexplained reason not considered by the trial court when *270it summarily decided that “[n]o award is, or will be, made for attorney’s fees that were incurred as the result of the defendants’ counterclaim.”
I would find error on the plaintiff’s cross appeal and remand the case for a hearing on the award of further attorney’s fees to the plaintiff for its defense of Yonkers’ counterclaim.
The plaintiff did not object to Yonkers’ self-impleader. See General Statutes § 52-102a; see also Practice Book § 117.
Although designated a “Third Party Cross-Complaint,” under our practice such a pleading by a defendant against the plaintiff is called a counterclaim and the trial court properly referred to it as such. See Practice Book § 116 (“In any action for legal or equitable relief, any defendant may file counterclaims against any plaintiff and cross claims against any codefendant provided that each such counterclaim and cross claim arises out of the transaction or one of the transactions which is the subject of the plaintiffs complaint”).
A judicial error on the record may be corrected upon motion to open or set aside the judgment. General Statutes § 52-212a; see Varanelli v. Luddy, 130 Conn. 74, 79, 32 A.2d 61 (1943).