It is certainly true that under New York law, "an agreement to agree" is, generally speaking, not considered a valid and enforceable agreement.
But, like many general rules, this rule is not absolute; there are exceptions, as "[a]n agreement may exist even where parties acknowledge that they intend to subsequently finalize the details of the agreement. (See Richbell Info. Servs., Inc. v Jupiter Partners, LP, 309 AD2d 288 [1st Dept 2003])." (2006 NY Slip Op 30201[U], *8.)
And, strangely enough, some of these exceptions actually make sense.
Consider, for example, an interim agreement that sets forth 90% of what the parties are each bound to do, and leaves out some relatively minor details to be filled in at a later date. In many instances, a court may find that there really was a meaningful agreement that was entered into, and as such, there would be an enforceable contract.
A word of caution: given the inherently detailed, and fact-specific nature of this kind of agreement, it is difficult to predict which way a court will lean in a particular case.
Finally, and at the risk of stating the obvious, you really want to avoid this type of circumstance altogether.