Britt, C.
Plaintiff alleged in his complaint that he employed defendant to bud a quantity of young fruit trees; that defendant agreed to bud the same in a careful and skillful manner, and thereupon entered upon the execution of the contract and budded the trees, but so negligently performed the work in certain specified particulars that plaintiff suffered damage to the amount of eighteen hundred and fifty-eight dollars and fifty cents, for which sum he demanded judgment. Defendant admitted in his answer the fact of his employment by plaintiff and that he budded the trees, but denied *262the alleged negligence, and averred in substance that any damage to the trees of plaintiff arose from the latter’s mismanagement in the matter. Then, for a counterclaim, defendant pleaded that plaintiff agreed to pay him for his services in budding the trees so much as such services were reasonably worth; that he, the defendant, completed the work on October 29, 1892, and that his services were reasonably worth the sum of two hundred and forty dollars; that on November 1, 1892, the parties “bad an accounting and settlement of all accounts and differences between them in relation to budding of said trees, and upon said settlement and in .... full discharge of the said contract, and in full settlement thereof, the plaintiff agreed to pay to defendant on December 1, 1892, the sum of one hundred dollars, and to deliver to defendant eleven hundred and twenty-five of said budded trees upon demand”; that' plaintiff at the same time wrote his acceptance of a draft drawn by defendant on him for said sum of one hundred dollars, such acceptance by its terms making the draft payable December 1, 1892; and also executed to defendant a written promise to deliver to him said eleven hundred and twenty-five trees; that defendant presented said draft at maturity to plaintiff for payment, which was refused; that the cost of protesting the same, paid by him, was five dollars; that plaintiff delivered four hundred of the trees only and refused to deliver the remainder, and that those undelivered were worth eighty-seven dollars and fifty cents; wherefore he prayed judgment against plaintiff for one hundred and ninety-two dollars and fifty cents, etc. He also filed a cross-complaint alleging the same facts set out in his counterclaim and prayed thereon the same relief.
After trial the court found all the issues in favor of the defendant, and awarded him judgment against plaintiff for the amount claimed by him (less the sum of five dollars, cost of protest of the draft) and costs of the action.
Plaintiff appeals from the judgment; and the point *263made is that the facts pleaded as a counterclaim are insufficient for that purpose; because, as claimed, they do not constitute a cause of action arising out of the transaction set forth in the complaint or connected with the subject of the action (Code Civ. Proc., sec. 438), and because the amount of defendant’s demand against plaintiff is less than three hundred dollars, and so not within the jurisdiction of the superior court. On similar grounds, apparently, it is also maintained that the cross-complaint is ineffectual as such.
Of course, if the matters set up by defendant consti-¡ tute a cause of action in his favor properly cognizable by the superior court, either as a counterclaim or a cross-complaint in this suit, the judgment must be upheld.
The transaction between the parties on November 1, 1892, by which the compensation to be rendered defendant was fixed in money and trees, and the time of performance by plaintiff was enlarged, amounted to an agreed statement of the account of defendant for budding the trees (Baird v. Crank, 98 Cal. 293, 297), and even something further. It was a new contract (Civ. Code, 1531, 1697) for which the original contract, or the performance thereof by defendant, furnished the consideration (Auzerais v. Naglee, 74 Cal. 60), and became, in the absence of legal impeachment, in itself an agreement, conclusive on both parties that, as the net result of such performance, the defendant was entitled to receive the compensation then fixed. On such new contract an action would lie in defendant’s favor (Green v. Thornton, 96 Cal. 67), and would be properly brought on the written instruments then executed by plaintiff. (San Jose Savings Bank v. Stone, 59 Cal. 183.)
The original contract was suspended, if not extinguished (Civ. Code, 1531, 1682, 1697); the plaintiff, while the new compact between himself and defendant remained in force, could maintain no action for any breach of duty by defendant under the former. His only proper course, if such breach had occurred, was to *264impeach the settlement by appropriate pleading for fraud, accident, or mistake. (Green v. Thornton, supra.) His complaint here is devoid of any allegation for that purpose; Had defendant brought his action on the written instruments made to him by. plaintiff, the latter could not have resisted recovery upon the ground of any defect in defendant’s performance of the original contract, unless by showing that the settlement of November 1, 1892, was induced by fraud or mistake. (Walker v. Millard, 29 N. Y. 375; Thorpe v. White, 13 Johns. 53.) For like reasons the defendant could maintain no action against plaintiff for compensation under the original contract. Since defendant pleaded facts showing that the original contract was superseded by a new obligation, he showed that neither party has any rights based upon it, and, as there is no cause of action arising therefrom in favor of plaintiff, so there is no right of recoupment arising from it in favor of defendant; it has ceased to be a “ transaction” giving rise to reciprocal demands so as to be the basis for affirmative relief under subdivision 1 of. section 438 of the Code of Civil Procedure. Consequently, the facts stated by defendant, although good as a defense, were insufficient as a counterclaim under that subdivision. For similar considerations such facts were improperly pleaded as a cross-complaint by defendant.
But they show a cause of action in his favor “ arising upon contract”; and it is a different contract from that described in the plaintiff’s complaint; and hence is rightly pleaded as a counterclaim under subdivision 2 of said section 438, provided the court had jurisdiction to entertain it.
The constitution of the state allows to the superior court jurisdiction in all “ cases at law .... in which the demand .... amounts to three hundred dollars.” (Const., art. VI, sec. 5.) This court has held that, “the demand spoken of in the constitution is a demand for judgment, evidenced by the prayer of a complaint, and a statement of facts which can uphold the *265judgment prayed for.” (Derby v. Stevens, 64 Cal. 288.) Can it make any difference in the construction of this provision that the prayer for judgment and the statement of facts occur in a counterclaim on an independent contract instead of an original complaint ? Is the constitution to have one meaning as applied to the demand of a plaintiff, and a diametrically opposite meaning as applied to the demand of a defendant in such a case? It is incredible that the framers of the instrument intended that the limitation under view should have effect or not according to the relation to the record occupied by the litigant seeking to enforce the demand. (See Picquet v. Cormick, Dud. (Ga.) 21.) In that case the court, speaking of a statute of the state of Georgia authorizing various defenses in an action, said: “ This will allow the plea of setoff where there exist mutual debts; but it will not enlarge the jurisdiction of the court, and enable it to take cognizance of a debt or demand set up by a defendant which it would not entertain for a plaintiff. The limitation must apply alike to each party, and the court can no more take cognizance of a cause for one than for another, where the pleadings themselves show the debt or demand not to be within its jurisdiction.”
Beyond question, if the defendant had commenced an action on the matters exhibited in his setoff, he must have done so in an inferior court, and in such action the plaintiff could not have set up any claim arising on contract in his, plaintiff's, favor, unless below three hundred dollars in amount. (Code Civ. Proc., 855; Maxfield v. Johnson, 30 Cal. 545.) It scarcely seems probable that the makers of the law designed to provide in such a case that the defendant may have the right of setoff in the superior court merely because he is defendant, when, if he had commenced his action—as he must have done if he had commenced at all—in a court having jurisdiction of demands less than three hundred dollars, the plaintiff would have been debarred the like privilege.
*266Of course, what is here said on the subject of jurisdiction has no application to the counterclaims provided for in the first subdivision of section 438 of the Code of Civil Procedure; the amount of the cross-demand under that subdivision is of no moment for jurisdictional purposes; our remarks are to be understood as confined to the unconnected causes of action mentioned in the second subdivision of that section, and limited also to cases presenting the substantial features of the present. If the setoff, less than three hundred dollars in amount, exclusive of interest, held by a defendant, is pleaded by him as purely defensive matter in reduction or extinguishment of the claim of the plaintiff in an action triable by the superior court, it may well be that the court can properly entertain the same; such was the case in Hart v. Cooper, 47 Cal. 77. It is under the statute (Code Civ. Proc., 440) perhaps as much a matter of defense merely as would be a plea of payment of a like sum. But where a defendant in that court shows by his pleading, as in this instance, that the plaintiff’s action, arising on contract, is wholly unfounded, we think it clear that he cannot also set up a cause of action on a different contract as the foundation for an affirmative judgment against the plaintiff, unless his demand, exclusive of interest, amounts to three hundred dollars.
The counterclaim set up in Webster v. San Pedro etc. Co., 101 Cal. 326, seems to have been properly referable to subdivision 1 of section 438 of the Code of Civil Procedure; and the same is probably true of that mentioned in Clark v. Taylor, 91 Cal. 552. Nothing is decided in either of those cases contrary to the view here . stated.
Our conclusion is reached with less reluctance, because the defendant may yet sue and recover in the proper court the sums due to him for breach of the plaintiff’s contract, evidenced by the written instruments of November 1, 1892.
The judgment should be modified by striking there? *267from the recovery of one hundred and ninety-nine dollars and seventy-five cents and interest thereon allowed to defendant, and as so modified the same should bo affirmed.
Belcher, C., concurred.
For the reasons given in the foregoing opinion the judgment is modified by striking therefrom the recovery of one hundred and ninety-nine dollars and seventy-five cents with interest thereon allowed to defendant, and as so modified the same is affirmed.
McFarland, J., Harrison, J.,
Temple, J., Garoutte, J.