This case presents questions of practice of some importance. If parties deliberately settle' an action out of court, and enter into an agreement in writing to that effect, the question is, how it can be carried into effect. In almost any other case than a question of costs, there would be little difficulty; because the agreement itself would be competent and pertinent evidence on trial of the issue. If the plaintiff had insisted on going to trial on his original cause of action, the accord and satisfaction, proved by the agreement, would have been a good bar; the mutual acknowledgments of satisfaction being considerations for each other. The defendants, therefore, supposing the execution and validity of the agreement proved, would have been entitled to a verdict. So if the defendant had persisted in going to trial, with a view to obtain a judgment against the plaintiff on a set-off. Rev. Sts. c. 96, <§>24. In such case, it would be competent for the party refusing to carry the agreement into effect, to deny its execution, or to insist that it was obtained by fraud or duress; and this would be tried by a jury. But that would go only to the question, whether any thing was due on either side, and not to the question of costs. The verdict would establish the validity of the agreement, as a bar to damages on either side; but the question of costs, even though it may depend on a question of fact, cannot be tried by the jury.
The court are of opinion, that the only question presented to the court below was decided right, and therefore that the exceptions must be overruled. The only motion of the plaintiff was, that the court would direct the entry of “ neither party ” to be made on the docket. The effect of that entry, when extended *274is an averment of the fact, that, on being called, neither party appeared to answer; or, in other words, that the plaintiff was nonsuited, and the defendant defaulted ; in which case, neither could have a judgment for costs. But as such was not the fact, inasmuch as the defendant expressed his determination to ap pear and answer when called, and as the parties had made no agreement in 'court, authorizing the court, in any contingency, to make such entry, the court had no authority to do so.
With regard to agreements made in court, and entered on the docket, or filed with the papers, there is no difficulty. The court, by its general superintending power, over all proceedings before it, will take notice of them, and act upon them in such manner as to carry them specifically into effect.
But the question still recurs, where a party has agreed not tc claim costs, or not to claim a particular item of cost, or costs of certain terms of court, whether that agreement cannot be carried into effect. There are cases in English practice, where a plaintiff, under special circumstances, is allowed, on motion, to discontinue without costs. Baynham v. Matthews, 2 Stra. 871. Melhuish v. Maunder, 2 New Rep. 72. 8 Petersd. Ab. Discontinuance, II. d. Wright v. Jones, 2 Smith, 260. Harris v. Jones, 3 Bur. 1451. But these are not cases of compromise and settlement by mutual agreement, but cases where, upon equitable considerations, a plaintiff is permitted to go out of court without paying costs. Perhaps this power might be considered as controlled by statute in this Commonwealth. By Rev. Sts. c. 121, <§, 1, it is provided that, “ in all civil actions, the party prevailing shall recover his costs against the other party, ‘except in those cases in which a different provision is made by law.” This provision was taken from St. 1784, c. 28, <§> 9, which in terms gave costs to the defendant, when the plaintiff, in any stage of his action, should become nonsuit, or discontinue his suit. In the case of Gilbreth v. Brown, 15 Mass. 179, it is said, by Mr. Justice Wilde, that “by this statute the defendant is entitled to his costs on a discontinuance of the suit; nor is it within the discretion of the court to disallow a motion to that effect.” But these statutes, and this decision, manifestly apply *275to a case, where the plaintiff discontinues ex mero motu, for obtaining some benefit or saving some advantage to himself; or where, without any act of the other party, or by his default, or inability to maintain his suit, he fails to prosecute it further. Besides; the St. of 1784, c. 28, does indeed declare that a party, in a certain case, shall be “ entitled ” to a certain right; but may not such a right be released or waived, or barred by payment or satisfaction ? It is made the duty of the court and its officers to tax the party’s costs, and he must move the court for that purpose; and on the taxation, the party against whom costs are claimed is entitled to notice. Although, therefore, he is out of court by the default or nonsuit, so far that he can no longer contest the cause of action, yet his right to have notice of the taxation of costs is reserved to him, and he is fully before the court for that purpose, and with a right to appeal to the court from any decision of the clerk. Rev. Sts. c. 121, ^ 27, 28. These provisions certainly carry a strong implication, that a party may object to the entire taxation, as well as to particular items, and may show any satisfactory cause, either why such items should not be allowed, or why no costs should be allowed. And if a party can, in any form, or in any mode of proceeding, avail himself of a release, payment, or satisfaction of costs, made in pais, he must do it by objecting to the taxation. As a test of this, we may put the strongest supposable case. Suppose, then, that the plaintiff and defendant have entered into a mutual agreement by deed, reci ting the existence of certain actions, the receipt of certain moneys in satisfaction of all claims on both sides, and an express release of all right and claim to costs by the plaintiff, in a particular action described, with leave to the plaintiff to discontinue ; or suppose parties have agreed on a settlement out of court, on the terms that the plaintiff shall discontinue and pay costs, and the clerk is applied to before the sitting of the court, and taxes the defendant’s costs, and the plaintiff pays them out of court, and takes a receipt on the taxed and certified bill. Pursuant to the agreement, the plaintiff appears at the term and discontinues, and then the defendant, contrary *276to his agreement, comes in and claims the taxation of the very same costs which have thus been paid out of court. Could not the fact be shown, in either case, in bar of the claim ? Or, to put the case perhaps stronger, suppose the plaintiff has become nonsuit, and, without waiting for an execution or formal taxation, the defendant makes out his own bill of costs, and the plaintiff pays it out of court. If the defendant should after wards apply to the clerk to tax his costs and grant execution, there being nothing on the record to show this payment, according .to the defendant’s theory, this matter could not be shown by way of objection. But we think, in such case, the record of discontinuance or nonsuit shows indeed a prima facie claim to costs, but that such claim may be barred by release, payment, or satisfaction, or by express waiver.
It seems to be objected, that such an inquiry might necessarily involve a question of fact, and that this could not be tried by the court. But where the duty is imposed on the court to try a question of controverted right, depending on matter of fact to be proved by evidence, and no provision is made for another mode of trial, the court must try it. Where the question is of the competency of a witness, depending on the fact of interest, to which evidence is offered, the court must weigh the evidence, and decide the fact. And so in a variety of other cases. In this very matter of taxing costs, items may depend on controverted facts. Suppose a certificate is offered, and it is alleged that it is forged, or obtained by fraud or duress ; or affidavits are exhibited, and the same is alleged of the signature of the affiant, or the jurat of the magistrate. It being made the duty of the court to tax the costs, these facts must be inquired into and decided, as incident. As this is made the duty of the court, we are of opinion that it is competent, when a defendant claims costs, on a discontinuance or nonsuit, to show that the costs have been released or paid, or the right to them waived ; and that this must be decided by the court. So of particular items, if the parties, on good consideration, had agreed to continue an action, one or more terms, without costs to one or the other, or without costs to either, it might be shown upon such taxation.
*277It may be remarked, in passing, that there is some difference between a nonsuit and a discontinuance ; the one being a default of the plaintiff, when called to appear and pursue his suit, and the other the positive act of the plaintiff, done on leave granted. But as, in both alike, the St. of 1784, c. 28, <§> 9, declares the right of the defendant to recover costs; and as, in both alike, the plaintiff has day in court to appear and show cause, on the taxation of costs; it appears to us that, in this regard, it makes no difference whether the plaintiff has gone out of court by a nonsuit or by a discontinuance.
The court are of opinion, that the entry of nonsuit must be confirmed, but that it will still be open to the plaintiffs, upon the motion of the defendant for the taxation of his costs, to show that, by the agreement between the parties, the action was settled, and a mutual acknowledgment made of payment and satisfaction of all claims and demands on both sides ; and that, if such an agreement is offered, and proved according to the rules of law, to the satisfaction of the court, it will be a good legal ground for refusing to allow costs.
This opinion is to be confined strictly to the case of taxation of costs, where all facts, as well those to be established by proof aliunde, as those appearing upon record, must be tried by the court or its officers, and will not necessarily apply to agreements in pais, in respect to actions pending in court upon other subjects distinct from costs. Perhaps the principle would apply to agreements relative to the continuance of causes, the admission of evidence, and other like cases, which are to be decided by the court exclusively; but it will be time enough to consider these questions when they arise.
Exceptions overruled, and nonsuit affirmed