Greek philosophy
In the Republic, Socrates examines the idea that justice means keeping one's word and returning what one owes. He tests it with a case where returning a weapon to a deranged friend would cause harm.
Keeping a commitment is not right in itself when doing so would bring serious harm; justice must be guided by understanding of what is truly good, not mechanical rule-following.
Source: Republic
Roman Stoicism
Cicero discusses conflicts between duties and argues that promises are not binding when keeping them would harm the person to whom they were made or when they were extracted by fear or deceit. He treats good faith as a foundation of justice yet subordinate to the common good.
A promise binds only within the limits of justice and benefit; if circumstances change so that fulfilling it would do more harm than good, a person may rightly set it aside.
Source: De Officiis
Scholasticism
Aquinas holds that fidelity to promises is a part of justice, yet obligations depend on the promise being for a possible and morally good end. Changed circumstances can excuse a person from performing what was promised.
One should keep promises ordinarily, but if conditions shift so that fulfilment would be wrong or truly harmful, not performing it does not count as vice.
Source: Summa Theologiae
Social contract theory
Hobbes makes keeping covenants the third law of nature and the root of justice. But covenants made under no assurance that the other side will perform do not bind, since reasonable fear of non-performance releases one.
Promises must generally be kept because without that there is no peace, but where the other party is likely to cheat, one is not bound to perform first.
Source: Leviathan
Empiricism
Hume views promising as an artificial convention that arises because it serves mutual interest and cooperation. Its obligation derives from social utility, not from a mysterious act of will.
The duty to keep promises exists because the practice benefits society; so exceptions are appropriate only when they do not undermine the convention that makes trust possible.
Source: A Treatise of Human Nature
Deontology
Kant uses the false promise as a central example of a maxim that cannot be universalized, since it would destroy the very practice of promising. He therefore treats promise-keeping as a strict duty not to be bent by convenience.
Making a promise one intends to break is irrational and wrong because it could not be a universal law; duty to keep one's word does not depend on how things turn out.
Source: Groundwork of the Metaphysics of Morals