I know in settlement agreements there are provisions that basically state:
You will not bring further legal action against the company.
I guess this shows that a contract can prevent a party from taking legal action against someone or something. I saw a waiver when joining a club that
You agree not to sue any employees or owners of the company for any injuries or damages.
Is it enforceable to preemptively agree not to sue when first entering into a relationship?