We study a contracting model with unforeseen contingencies in which the court is an active player. Ex ante, the contracting parties cannot include the risky unforeseen contingencies in the contract they draw up. Ex post, the court observes whether an unforeseen contingency occurred and decides...