I concur in the result reached by the majority. However, in my opinion a broader and more compatible legal premise to support the result here is that the stipulated judgment was invalid when it was made, because judicial enforcement of that judgment violates the Goswicks’ rights under the California Constitution. (Art. I, § 1.)
I
Goswicks argued that the statutes collectively known as the Community Care Facilities Act (Act) (Health & Saf. Code, § 1500 et seq.) make the stipulated judgment unenforceable. However, section 1566.5 of the Act makes the law expressly prospective to private covenants executed “on or after January 1, 1979.” These 1978 statutes therefore do not void the covenant or the stipulated judgment here. I would search further for reasons why the stipulation is not enforceable. To this end, the Goswicks rely on the rationale of the landmark decision in City of Santa Barbara v. Adamson (1980) 27 Cal.3d 123 [164 Cal.Rptr. 539, 610 P.2d 436, 12 A.L.R.4th 219]. That decision invalidated the city’s “rule of 5” in its R-l ordinance, as an unconstitutional invasion of the residents’ privacy in choosing living companions, violative of California Constitution, article I, section 1 (added 1974). Adamson augured a new approach to municipal zoning, which now may not irrationally or arbitrarily infringe constitutional privacy rights without a showing of compelling justification. (See City of Chula Vista v. Pagard (1981) 115 Cal.App.3d 785 [171 Cal.Rptr. 738].) Adamson holds the least favored *410zoning restrictions are those aimed at broad categories of uses, barring the harmless with the objectionable. The Goswicks argue the same constitutional based rules apply here; their use of the property is entirely innocuous, does not in any way effect or subvert the residential character of the neighborhood or otherwise infringe upon any of the legitimate goals of single family residential use restrictions.
However, the Adamson decision articulates limits on governmental entities in enacting land use laws; it sets no express limit on private restrictive covenants such as in the case at bench.
II
Private covenants which directly foster an unconstitutional and invidious form of discrimination, most commonly racial discrimination, have been denied judicial enforcement. (Shelley v. Kraemer (1948) 334 U.S. 1 [92 L.Ed. 1161, 68 S.Ct. 836, 3 A.L.R.2d 441]; Abstract Investment Co. v. Hutchinson (1962) 204 Cal.App.2d 242 [22 Cal.Rptr. 309]; cf. Mulkey v. Reitman (1966) 64 Cal.2d 529 [50 Cal.Rptr. 881, 413 P.2d 825].) The same rule applies to covenants which violate state laws, such as the Unruh Civil Rights Act (Civ. Code, §§ 51, 52) or Rumford Fair Housing Act (Gov. Code, § 12900 et seq.). In California, however, the extent to which the Shelley v. Kraemer doctrine shall be applied to private restrictive covenants is unclear.
In the Abstract Investment Co. case, supra, the Court of Appeal held a tenant defending an unlawful detainer action was entitled to raise the affirmative defense of racially motivated eviction, because under the Shelley v. Kraemer doctrine, the court would not lend its equitable powers to assist an unconstitutional discrimination. Yet in Hill v. Miller (1966) 64 Cal.2d 757 [51 Cal.Rptr. 689, 415 P.2d 33], when a tenant brought an action seeking an injunction to restrain defendant landlord from evicting the tenant solely because of his race, the Supreme Court affirmed the judgment for the landlord, saying private acts of discrimination are not unlawful and the Fourteenth Amendment imposes no affirmative duty on the state to take positive action to prohibit a private discrimination. Hill did not overrule Abstract Investment', to the contrary, it cited it expressly with approval for the proposition the state may not make available to a discriminating landlord the aid and processes of courts. Hill has later been cited by various authorities for the proposition private discrimination is not unlawful unless a statute prevents it. (See, e.g., 2 Miller & Starr, Current Law of *411Cal. Real Estate (rev. ed. 1977), § 15:31.) Clearly, though, that interpretation is too broad, given Hill’s express approval of the Abstract Investment doctrine. Rather, Hill and Abstract Investment can be reconciled based upon their different procedural posture. Private discrimination is unenforceable in an affirmative action, as for eviction, by the landlord (or analogous person), but a potential discriminatee may not come into court in advance of the discriminatory eviction to enjoin it. From this rationale it follows, in terms of the procedural history of this case, the Goswicks would not be entitled to the declaratory relief to prevent enforcement of the covenant, but if the covenant infringed a constitutional rule, they could resist eviction and defend a contempt action on that ground.1
Here, without question, the covenant violates the constitutional privacy right defined in the Adamson case, supra, because it, exactly like the Santa Barbara “rule of 5,” seeks to control a personal living arrangement which (1) in no way adversely impacts the neighborhood nor threatens the goals of the restrictive covenants or the local zoning, and (2) this conclusion is evidenced by the 1978 legislation, declaring it to be a use which in no way differs from single family residential use generally.
The nonretroactivity of the statute is immaterial when used in this context. Although legislation may not reach backwards in time to impair private obligations of contract, fundamental constitutional rights may not be transgressed whether by pre-existing or contemporaneous agreement. The Adamson decision rested upon a constitutional basis, and the values it describes and protects are those infringed by the covenant here. The 1978 legislation is relevant only to confirm the nonoffensive nature of the Goswicks’ use. The Goswicks’ right to maintain that use has been protected since 1974 by the constitutional announced privacy right to choose their living companions and pursue their chosen lifestyle without interference, so long as that use does not *412adversely affect the single family residential character of their neighborhood. I conclude the trial court’s enforcement of the covenant and preventing the Goswicks’ present use is unconstitutional under Adamson, supra, 27 Cal.3d 123, because it lends the affirmative aid of the courts, through an eviction order, to furthering an unconstitutional invasion of the Goswicks’ privacy.
III
This further fact must be confronted. The Goswicks have previously stipulated to the invalidity of their present use. In general, stipulated judgments fail if they enforce illegal agreements. (See generally, 1 Wit-kin, Cal. Procedure (2d ed. 1970) Attorneys, § 123; cf. Oakland Raiders v. City of Berkeley (1976) 65 Cal.App.3d 623 [137 Cal.Rptr. 648].) While such judgments have many of the' attributes of private contracts (e.g., Jackson v. Puget Sound Lumber Co. (1898) 123 Cal. 97, 100 [55 P. 788]), yet because the court is a party to such a judgment it necessarily retains some discretion to avoid such an agreement beyond its normal powers to interfere with a purely private contract. (See, regarding the strict construction of stipulations, City of Ukiah v. Fones (1966) 64 Cal.2d 104, 107 [48 Cal.Rptr. 865, 410 P.2d 369].) The statute (Health & Saf. Code, § 1566.5, infra) which expressly preserves the validity of pre-existing deeds, contracts, and covenants (discriminating against residential care facilities) yet does not expressly exempt pre-existing stipulations or consent judgments. Orthodox doctrine holds a stipulation is void only if contrary to public policy in effect when it was signed (e.g., Cooley v. County of Calaveras (1898) 121 Cal. 482, 485-486 [53 P. 1075]; Russell v. Soldinger (1976) 59 Cal. App.3d 633 [131 Cal.Rptr. 145]). Nevertheless a stipulation should not be judicially approved and enforced when it violates an express constitutional right as well as being contrary to a presently operative legislative policy. (Oakland Raiders v. City of Berkeley, supra, 65 Cal.App.3d 623.)
It is argued we are not dealing with an absolute constitutional right when considering the right of privacy and therefore different considerations should apply to privacy restricting conditions than in racially restrictive covenants which are always impermissible.
Two arguments have suggested as compelling enforcement of this stipulated judgment. First, the right of privacy differs from the right of equal protection in its less than absolute character. The right to privacy *413can be sold, waived or given up. There is no antisocial or immoral connotation that necessarily attaches to such an act. Also different considerations surround enforcement of racially restrictive covenants, of which perhaps the most important is, it is not normally the victim of racial discrimination—the minority person—who has agreed to give up his right of equal protection. He is not a party to any covenant at all. He is the recipient of an abomination imposed by others. Here, however, we have a private agreement not to use property in an otherwise lawful way. If the only constitutional protection relevant to this agreement is the right to privacy, and if privacy may be waived, where do we find justification not to enforce the agreement?
As a general basic principal, lawful private agreements are protected, their enforceability normally presumed. Yet the protection of contractual expectation is not sacrosanct; exceptions exist. For example, there is the impossibility doctrine. Agreements are not enforced when to do so would be wholly inequitable or even ridiculous because of some supervening impossibility which could not have been reasonably foreseen or avoided and which was obviously not contemplated by the agreeing parties. There are also the immaterial breach exceptions which preclude one party from standing on the letter of the agreement when the other party’s dereliction is trivial, not germane to the agreement’s purposes. We must here compáre competing constitutonal rights—privacy, with that of contractual expectations. Therefore, we must consider the question of the reasonable fulfillment of sensible expectations within the terms of this agreement.
If the agreement is not enforced the Goswicks get away with having signed a contract and reaped the fruit—avoidance of a lawsuit—without being forced to honor their agreement. Such result has an erosive effect on the general law of protection of expectation of contract fulfillment. It weakens the justifiable reliance of contracting parties on the court’s willingness to enforce such agreements. It may therefore indirectly encourage bad faith execution of agreements which the signers do not intend to perform. A juristic as well as moral ill effect follows upon the nonenforcing of the stipulation.
On the other side of the reasonable expectations ledger, the failure to enforce does not violate Welsch’s primary objective goal in the litigation, that is to preserve the single family residential use. Regardless of stipulation in fact the Goswicks’ use does not conflict with the single family residential character of the neighborhood. The failure to enforce *414the stipulation may infringe upon some as yet unstated subjective objectives of Welsch. However, such goals cannot be weighed in the balance for Welsch has not opened them to our inspection. On this record we can only conclude she loses nothing of an objective nature by the nonenforcement.
On the other hand, nonenforcement protects the stability of the tenants’ domicile and lifestyle. Enforcement conversely would invade and be destructive of such cherished and protected relationships. To sum up the balance, then, it appears if we enforce the stipulation, we would accomplish only one goal—a theoretical protection of contractual expectation coupled with punishment of the Goswicks for violating that norm— at the price of disrupting a peaceful and nonoffensive tenancy. But there are other balancing considerations.
IV
The privacy right in question is not simply the individual’s choice to be alone, or to live in a way that does not disturb the neighbors. The attributes of the Goswicks’ right to privacy must be viewed in a much broader, society oriented land use context. Such a privacy right affects more people than at first meets the eye. The “privacy” concept expounded in the Adamson decision is a protection irrevocably interwoven with the 20th century land use dilemma. Adamson recognized the particular importance of the right to privacy in that context. For the first time our Supreme Court has given explicit constitutional protection, even against governmental regulation, to a nonconforming but objectively harmless lifestyle. It did so in a context of steadily shrinking available housing options and a recessive economy.
I do not assume the Supreme Court intended that protection not to affect private covenants. For restrictions, private as well as governmental, have the potential through stifling, conforming and unjustifiable pressures to disrupt, needlessly, innocent free uses of the land. It is that disruption at which the Adamson decision is aimed, and it must weigh strongly in the balance here. The Goswicks’ use of the house is analogous to that in Adamson.2 It is limited to a multiple occupancy situation with no discernible objective impact on the neighborhood. In *415view of the manifest need of every man or woman—child, adult, aged— for shelter, the increased unavailability of shelter, and the societal mandate to prevent chaotic dislocation, the doctrine of the sacrosanct untouchable contract right must give way to limited regulation conformable to the constitutional imperatives. Courts, of course, do not legislate, but they can and do decide the validity of evictions for antisocial reasons, or here, the issue of enforceability of private agreements which disrupt private living arrangements for no valid objective purpose.
The policy we protect is not merely privacy—It is continuity of residence, the right to shelter, the right to stay under one’s same roof. Protecting that special kind of privacy right, as accomplished in Adam-son, is of current critical priority, and will probably become more so as time passes and land resources shrink further. That policy is entitled to more protection than private expectations based on unreasonable motives. The inroad, if such it be, on the juristic doctrine protecting contractual expectancy, must be accepted, as it already has been in other areas of law, as one of the costs of attending on an overcrowded urbanized California.
Freedom of contract is a most important right. Yet in the context of the constitutionally protected, legislatively approved land use involved, the contract right must be subordinated. The goals to be achieved by enforcing this stipulation are not as important as protecting the existing, lawful, conforming tenancies. As of this day a government could not compel discontinuance of the use (Adamson) and private parties could not agree to such a covenant after the effective date of the 1978 statutes. The use is wholly harmless, completely compatible with the reasonable expectations of the other subdivision neighbors. Under all these circumstances, to enforce the stipulation would be manifestly wrong.
A petition for a rehearing was denied April 30, 1982, and the petition of respondent and real party in interest Welsch for a hearing by the Supreme Court was denied June 16, 1982.
We do not here confront the niceties involved in those cases that distinguish affirmative v. nonaffirmative action of a court. We need not seek out the “significant” “immediate” “direct” degree of state involvement or action. (See Reitman v. Mulkey (1967) 387 U.S. 369 [18 L.Ed.2d 830, 87 S.Ct. 1627]; Mulkey v. Reitman, supra, 64 Cal.2d 529, 536 [50 Cal.Rptr. 881, 413 P.2d 825]; Kruger v. Wells Fargo Bank (1974) 11 Cal.3d 352 [113 Cal.Rptr. 449, 521 P.2d 441, 65 A.L.R.3d 1266]; Garfinkle v. Superior Court (1978) 21 Cal.3d 268 [146 Cal.Rptr. 208, 578 P.2d 925].) There is, beyond doubt, significant, immediate, and direct state (court) action involvement in the ordered eviction of six elderly ladies and assessing of $4,000 attorney’s fee against the Goswicks.
There is no evidence here of any “transient or institutional uses (hotels, motels, boarding houses, clubs, etc.)” (City of Santa Barbara v. Adamson, supra, 27 Cal. 3d at p. 133) that would in any way be destructive of the residential character of the neighborhood.