Say party X wants to sue party Y for $500 in damages. If, after some negotiation, party Y agrees to pay party X $400 if they don't go to court and make things quick and easy and party Y agrees. What would prevent from party X taking the $400 then still going to court? Would the case automatically be dismissed if the judge finds evidence this had been settled? What if party X argues that it had reconsidered and wants the full $500?
I'm assuming some sort of contract would be needed, that says something like "this issue is considered resolved upon receiving $400 from party Y and party X agrees to not initiate litigation relating to the issue". But even then, to my understanding, a contract can't prohibit a party from seeking legal remedies.