Sa’if 3, Mechaber: If a person volunteered, without being sued, that he owed somebody’s father one hundred dinarim but claims he has already repaid fifty dinarim, he is exempt from taking both the Modeh Bemiktzat, the oath of partial admission, and the rabbinical oath of denial known as the Shevuat Heseit that all defendants who deny a claim in its entirety are obliged to swear.
Ner Eyal: The reason the debtor is exempt from an oath is because had he not volunteered the unsolicited admission in the first place, the creditor would never have known about the debt. The debtor, therefore, is like a finder who returns lost property to its owner. Upon returning lost property, the finder does not have to swear that he did not find more than he is actually returning. This is so even if the owner claims he lost more and accuses the finder of misappropriating part of what he found. The rabbis absolved finders from taking an oath for reasons of public policy. They reasoned that if finders would be obliged to swear, people would simply ignore lost property and walk by.
Furthermore, had the self-proclaimed debtor wished to lie, he could have simply remained silent and kept all of the money.
The Shulchan Aruch brings the example of volunteering the existence of a debt to the children of the creditor rather than to the creditor himself, because it is more likely that the creditor’s children would be unaware of the existence of the debt than the creditor himself. Nevertheless, the same law applies where the debtor volunteered the unsolicited admission directly to the creditor rather than to his children.
If the creditor responds to this unsolicited admission by thanking the debtor for reminding him of the debt, the finder is still absolved from taking an oath. If, however, the creditor responds that he is well aware of the debt and is certain the debtor owes it and had every intention of claiming it, the debtor is obliged to take the rabbinical oath of denial known as the Shevuat Heseit that all defendants who deny a claim in its entirety are obliged to swear.
Furthermore, if it appears to the judge that the reason the debtor volunteered the existence of the debt is because he anticipated the creditor would press a claim and wanted to evade the Modeh Bemiktzat oath of partial admission by preempting the claim, the judge may impose this oath on him.