We analyze a consumption-saving problem in which time-inconsistent preferences generate demand for commitment, but uncertainty about future consumption needs generates demand for flexibility. We characterize in a standard contracting framework the circumstances under which this combination is possible, in the sense that a commitment contract exists that implements the desired state-contingent consumption plan, thus offering both commitment and flexibility. The key condition that we identify is a preference reversal condition: high desired consumption today should be associated with low marginal utility at future dates. Moreover, there are conditions under which preference reversal naturally arises. The key insight of our paper is that time-inconsistent preferences not only generate commitment problems, but also allow their possible solution, since the preferences of later selves can be exploited to punish overconsumption by earlier selves.