MEMORANDUM
In August of 2000, defendant Allstate Insurance Company entered into an Independent Exclusive Agency Agreement with plaintiff Robert M. Curley, a fifteen-year employee who had recently established his own insurance agency. When Curley’s Pennsylvania insurance license temporarily lapsed in 2001, his Agreement with Allstate automatically terminated. Allstate then occasioned this suit by refusing to reinstate Curley, thereby compelling him to sell his book of business to another agent. 1
In the Rule 12(b)(6) motion 2 now before us, Allstate seeks dismissal of Curley’s *616 claims for unjust enrichment and breach of the covenant of good faith and fair dealing. We write at some length about this factually simple case because it casts into relief two often-confusing issues in the law of contracts: the circumstances under which an express contractual term overrides the covenant of good faith and fair dealing, and the principle that a claim for unjust enrichment is unavailable where the parties’ relationship is founded on a contract.
I. Factual Background
According to the complaint, Curley began to work in Allstate’s underwriting department in 1985, and in April of 1993, he obtained a Pennsylvania insurance license. In February of 1999, Curley entered into an R3000 Exclusive Agent Employment Agreement with Allstate, under which he became an Allstate agent but remained a company employee. After Curley completed eighteen months as an Exclusive Agent, he and Allstate signed an R3001 Independent Exclusive Agency Agreement in August of 2000. As an Independent Exclusive Agent, Curley worked as an independent contractor and sold insurance products for Allstate on a commission basis.
In mid-July of 2001, Allstate notified Curley that his Pennsylvania insurance license had lapsed. Upon further investigation, Curley learned that, as a result of a recent change in the Department of Insurance’s rules, his license had expired in April (the month his license had originally issued) rather than September (his birth month). 3 On Thursday, July 19, 2001, Curley went to Allstate’s regional headquarters, where a company representative sponsored Curley’s renewal application by signing the necessary Department of Insurance paperwork. Curley then drove to Harrisburg on Friday and hand-delivered his application. The Department of Insurance reissued Curley’s license on Monday.
Two days later, Allstate invoked the termination provisions in the R3001 Agreement and refused to reinstate Curley as an agent. Under the terms of the Agreement, Curley had no choice but to sell his book of business to another agent, subject to Allstate’s approval. He ultimately sold to Gerald Cassidy, a more senior Allstate agent who no longer received the “significantly greater” commissions that Allstate pays newly-established independent agents such as Curley. Compl. ¶ 48.
II. Discussion
Curley’s complaint asserts four claims. Count I avers that Allstate breached the covenant of good faith and fair dealing by invoking the termination provisions of the Agreement. Count II advances a claim under the covenant of good faith focusing on Allstate’s refusal to reinstate Curley after he renewed his insurance license. Count III asserts that Curley’s sale of his book of business unjustly enriched Allstate because it pays Cassidy a lower commis *617 sion than Curley had received. Count IV raises a claim for tortious interference with prospective contractual relations that stems from Allstate’s alleged statements to a prospective employer after Curley’s termination. Allstate has not challenged Count IV, but seeks dismissal of the rest of the complaint.
A. Breach of the Covenant of Good Faith and Fair Dealing (Counts I and II)
The Pennsylvania Superior Court
4
has adopted Section 205 of the
Restatement (Second) of Contracts
(“Section 205”), which provides that “[e]very contract imposes upon each party a duty of good faith and fair dealing in its performance and its enforcement.”
See Kaplan v. Cablevision of Pa., Inc.,
In their efforts to temper the lofty language of the
Restatement,
courts have emphasized that the covenant of good faith is nothing more than an implied contractual term that does not override the. express terms of the parties’ bargain or transform them into each other’s fiduciaries.
See Original Great Am. Chocolate Chip Cookie Co.,
However, courts in Pennsylvania and elsewhere have not hesitated to recognize that, where applicable, the covenant can significantly limit the parties’ ability to engage in self-dealing conduct. One such context is where the contract grants one party discretion over some aspect of performance, for in these cases the party accorded discretionary power can opportunistically subvert the legitimate expectations of the other party.
See, e.g., Huang v. BP Amoco Corp.,
With these principles in mind, we scrutinize the terms of the Agreement to determine whether Curley has stated claims under the covenant of good faith and fair dealing. 5 The Agreement expressly pro *618 vides that it will be “terminated automatically ... upon the loss of any required agent license.” Agreement § XVII.A.4. Although this language suggests that the lapse of Curley’s license ended his relationship with Allstate, other provisions of the Agreement reveal that “automatic termination” is more analogous to a marital separation than a full-blown divorce. The Agreement incorporates Allstate’s Exclusive Agent Manual (“EA Manual”), which describes in some detail the reinstatement procedures that take effect when an agent’s license lapses:
The R3001 Agreement automatically terminates upon the loss of any required agent license. Therefore, when the Company is notified that this has occurred, you will be notified that your Agreement has terminated.
If you still want to maintain an agency relationship with the Company, and you meet the necessary state requirements ... to reinstate your license within thirty (30) days of notice of the license termination, at the Company’s discretion, you may execute a new R3001S (or C) Agreement when the license is reinstated. You will keep your same agent number. In the meantime (i.e. upon termination of the agreement and prior to reinstatement of the license):
• You will cease any activities that require an agent license ....
• You may continue to perform those activities that do not require an agent license ....
It is important to note, however, that if you fail to meet the licensing requirements within thirty (30) days, the termination processing will continue and at that point, you should refer to Sale of Agency and Termination Payment for information about the sale of agency and termination payment options that may be available.
Compl. Ex. A (reproducing portions of EA Manual).
In sum, the Agreement automatically terminated Curley’s agency relationship with Allstate. However, it did not completely unwind their contractual relationship and thereby reduce Curley to the status of a stranger, whose offer to become an agent Allstate could, at its whim, accept, reject, or ignore altogether. 6 As long as Curley renewed his state license within thirty days, he could request reinstatement and, by necessary implication, insist on a response from Allstate.
In view of this contractual framework, we must dismiss Count I of the complaint, which asserts that Allstate breached the covenant of good faith and fair dealing by terminating its agency relationship with Curley. The Agreement states that termination occurs automatically upon the lapse of Curley’s license, and as we note above, the covenant of good faith does not override the express terms of the contract. 7 Indeed, it is difficult to *619 see how the covenant of good faith has any-bearing at all on a contractual term that strips both parties of discretion.
Count II of the complaint, which focuses on Allstate’s alleged bad faith in refusing to reinstate Curley, demands a different analysis. Allstate offers two arguments in favor of the dismissal of Count II. First, it contends that this claim fails as a matter of law because, as a result of the automatic termination provision, there was no contract in existence when it declined to enter a new agency agreement with Cur-ley. As we explain above, however, the EA Manual sets forth a reinstatement process that belies Allstate’s claim that the lapse of Curley’s license sundered the parties’ contractual relationship.
In the alternative, Allstate argues that even if there was a contract in existence, the express language of the EA Manual overrides the covenant of good faith because it granted Allstate “the unfettered right to decline plaintiffs request for reinstatement.” Def.’s Mem. at 6. We decline to accept Allstate’s expansive construction of the parties’ agreement at such an early juncture in this case. The EA Manual merely provides that reinstatement is “at the Company’s discretion.” We cannot say that this language unequivocally preserved Allstate’s right to seize upon the lapse of an agent’s license to dump him for any reason, good or bad. Not only must we construe the Agreement and EA Manual
contra proferentem, see supra
n. 5, but even a casual examination of Pennsylvania authority shows that whether the covenant of good faith governs a party’s conduct is a fact-intensive inquiry that can yield divergent results in contextually similar eases.
Compare Baker,
B. Unjust Enrichment (Count III)
In Count III, Curley invokes the doctrine of unjust enrichment to disgorge the extra profits that Allstate now reaps from his former book of business as a result of the lower commissions it pays the new agent. Unjust enrichment occurs when (1) the plaintiff has conferred benefits on the defendant, (2) the benefits have appreciated, and (3) it would be inequitable for the defendant to retain those benefits without payment of value.
Styer v. Hugo,
Curley argues that he has stated a claim for unjust enrichment because he does not have a contractual remedy that can redress Allstate’s allegedly wrongful conduct. However, Pennsylvania law has long recognized that the doctrine of unjust enrichment is unavailable where, as here, “the relationship between parties is founded on a written agreement or express con
*620
tract.”
Schott v. Westinghouse Elec. Corp.,
We digress to point out that, even if we could ignore Schott, we very much doubt that the Pennsylvania Supreme Court would abandon the rule that contractual parties cannot invoke the doctrine of unjust enrichment when their relationship unravels. Not only does the rule have a distinguished common-law pedigree, but it also derives a great deal of justification from bedrock principles of contract law.
We begin with history. The doctrine of unjust enrichment dates back to
Moses v. Macferlan,
97 Eng. Rep. 676 (K.B.1760). One Jacob had made out four promissory notes payable to plaintiff Moses. To enable defendant Macferlan to collect the £6 debt, Moses endorsed the notes to Macfer-lan. Moses and Macferlan also signed an indemnity agreement so “that Moses should not be liable to the payment of the money or any part of it ... by reason of such his endorsement.”
Id.
at 676,
If the defendant be under an obligation, from the ties of natural justice, to refund; the law implies a debt, and gives this action, founded in the equity of the plaintiffs case, as it were upon a contract (“quasi ex contractu,” as the Roman law expresses it).
Id.
at 678,
British courts were slow to embrace Lord Mansfield’s approach. Indeed, as late as 1923 Lord Justice Serutton dismissed a quasi contractual theory of liability with the peevish remark that “[wjhatever may have been the case 146 years ago, we are not now free in the twentieth century to administer that vague jurisprudence which is sometimes attractively styled ‘justice as between man and man’ .... ” Holt v. Markham, [1923] 1 K.B. 504, 513 (1923). Although the doctrine found a more receptive audience among American jurists, they confirmed that it is a remedy designed to protect the plaintiff whose injury does not arise from a contractual relationship with the unjustly enriched defendant. In 1857, the Pennsylvania Supreme Court underscored this point in a discussion of the differences between the quasi contract and the implied-in-fact contract:
In one case the contract is mere fiction, a form imposed in order to adapt the case to a given remedy; in the other it is a fact legitimately inferred. In one, the intention is disregarded; in the other, it is ascertained and enforced. In one, the duty defines the contract; in the other, the contract defines the duty.
Hertzog v. Hertzog,
Pennsylvania’s bright-line rule also has deep roots in the classical liberal theory of contract. It embodies the principle that parties in contractual privity, such as Cur-ley and Allstate, are not entitled to the *621 remedies available under a judicially-imposed quasi contract because the terms of their agreement (express and implied) define their respective rights, duties, and expectations. When the non-breaching party elects to sue on the contract, ordinary contract rules limit compensatory damages to his expectancy interest, even if this measure of relief fails to disgorge the breacher’s profits. See generally E. Allan Farnsworth, Your Loss or My Gain? The Dilemma of the Disgorgement Principle in Breach of Contract, 94 Yale L.J. 1339 (1985); see also Dan Dobbs, 3 Law of Remedies § 12.7(4), at 174-78 (2nd ed.1993) (outlining exceptions to the general rule, the most significant of which being where the breach of contract also involves a breach of fiduciary duty).
III. Conclusion
We therefore will grant Allstate’s motion as to Counts I and III, but allow the case to proceed on Counts II and IV. An Order to this effect follows.
ORDER
AND NOW, this 31st day of October, 2003, upon consideration of defendant’s motion to dismiss (docket entry # 2), plaintiffs response thereto, and defendant’s reply memorandum, and in accordance with the accompanying Memorandum, it is hereby ORDERED that:
1. The motion is GRANTED IN PART AND DENIED IN PART;
2. Counts I and III of the complaint are DISMISSED;
3. In all other respects, the motion is DENIED;
4. Defendant shall ANSWER the complaint by November 21, 2003; and
5.A Rule 16 conference shall CONVENE in Chambers (Room 10613) at 2:00 p.m. on Tuesday, December 2, 2003.
Notes
. Curley filed this action in the Philadelphia Court of Common Pleas on July 22, 2003. Allstate removed it to federal court on August 21, 2003 on the basis of diversity of citizenship.
. In resolving a motion to dismiss brought under Fed.R.Civ.P. 12(b)(6), we look only to the facts alleged in the complaint and its attachments.
Jordan v. Fox, Rothschild, O’Brien & Frankel,
. According to the complaint, Curley had recently moved to a new residence. He apparently never provided the Department of Insurance with his new address, and the United States Postal Service did not forward the license renewal notice.
. The Agreement does not contain a choice of law provision, but both parties' pleadings rely exclusively on Pennsylvania authority, and we see no reason to quibble with that reliance. We are also well aware of the fact that the Pennsylvania Superior Court does not enunciate the definitive word on Pennsylvania law, but as its jurisprudence here is Restatement-based, we harbor confidence that the Pennsylvania Supreme Court would not take exception to our use of these decisions in making our Erie predictions here.
. We note that Curley had no hand in drafting either the Agreement, and we therefore construe it
contra proferentem. See Sun Co., Inc. (R & M) v. Pennsylvania Turnpike Comm'n,
. The distinction between the parties' agency relationship and their contractual relationship is not mere wordplay. As the EA Manual notes, the Commonwealth can subject Allstate to regulatory action and penalties if an agent continues to sell insurance after his license has lapsed. See Compl. Ex. A. Automatic termination of the agency relationship thus protects Allstate from its agents' failure to comply with state law. However, it does not follow from the fact that the R3001 contains this protective provision that the parties' entire contractual relationship also ends when the agent's license lapses.
. Curley argues that termination could not be automatic because Allstate chose to sponsor his license renewal. PL's Resp. at 13. However, Allstate's conduct was consistent with the above-described contractual framework, which certainly contemplated the possibility of reinstatement but deferred that decision until the Department of Insurance had acted on the renewal application. Curley also ar *619 gues that termination cannot be automatic because Allstate has declined to terminate other, similarly-situated agents. Id. If those agents also signed R3001 Agreements, it would be more accurate to say that Allstate chose to reinstate them following their automatic termination.
