We study a variant of the repeated Prisoner's Dilemma with uncertain horizon, in which each player chooses his foresight ability: that is, the timing in which he is informed about the realized length of the interaction. In addition, each player has an independent probability to observe the opponent's foresight ability. We show that if this probability is not too close to zero or one, then the game admits an evolutionarily stable strategy, in which agents who look one step ahead and agents who look three steps ahead co-exist. Moreover, this is the unique evolutionarily stable strategy in which players play efficiently at early stages of the interaction. We interpret our results as a novel evolutionary foundation for limited foresight, and as a new mechanism to induce cooperation in the repeated Prisoner's Dilemma..