Radak (to vv. 20 and 3636) and Ralbag (to v. 3737) seem to take a bit of a different tack than the answer given by morah hochman. They say that indeed Yonasan at first figured that he won't be able to speak with David in person because there might be people around, and therefore he'd have to use the signals. Once he saw (after he was done with those) that indeed no one else had come besides him and his servant, then he changed plans and sent his servant home, at which point David realized that the coast was clear and came out to see Yonasan.