From: Rabbi Moshe Sofer
To: Rabbi Leib
The Chasam Sofer resolves the apparent contradiction in the Rambam between requiring hatfasah b'davar ha-nadur (Hilchos Nedarim) and ruling that Shimshon's angel-imposed nezirus serves as a valid basis for such hatfasah (Hilchos Nezirus). He argues that the Rambam follows R' Yehudah, who rejects Shimon HaTzadik's restrictive view that a Nazir is inherently a sinner, thereby freeing the verse 'lehazir la-Hashem' to include Nezir Shimshon as a valid davar ha-nadur. Furthermore, Shimon HaTzadik's position constitutes a minority shitah, and the halacha does not follow a shitah.
Source: Shu"t Chasam Sofer YD §219