How did the meaning of stipulari (to extract a promise) develop from stipula (a stalk), if indeed it did?
This connections is explained in The Etymologies of Isidore of Seville as follows:
A stipulation is a promise or a pledge, whence stipulators are also called promisors. And stipulation (stipulatio) is so called from straw (stipula), for the ancients, when they would promise each other something, would break a straw that they were holding; in joining this straw together again they would acknowledge their pledge.
The original words of Isidore of Seville from his Etymologiae:
Stipulatio est promissio vel sponsio; unde et promissores stipulatores vocantur. Dicta autem stipulatio ab stipula. Veteres enim, quando sibi aliquid promittebant, stipulam tenentes frangebant, quam iterum iungentes sponsiones suas agnoscebant [sive quod stipulum iuxta Paulum iuridicum firmum appellaverunt].
In his article, "Some Latin Words and Their Ways", Norman DeWitt describes this sort of pledge taking place at a cattle market (based on Varro's De Re Rustica):
The next step in this solemn ceremony was the guarantee or stipulatio. The vendor and purchaser faced one another holding between them the dry stalk of a plant, stipula, just as two people nowadays hold the wishbone of a fowl. The vendor then made a declaration such as follows: "I guarantee these animals to be of sound health, to be out of a healthy herd, to be without blemishes, and that they may be held in lawful possession." Then they broke the stalk and took their departure, probably to the nearest wineshop, feeling that a bond had been established between them. With this may be compared the custom of lovers who used to break a coin and carry the halves of it as a pledge of engagement to marry. The Roman ceremony was denoted by the deponent stipulari.