Based on the following interchange between Harry and Dumbledore in the pivotal "King's Cross" chapter of Deathly Hallows, I was wondering when exactly Dumbledore put together that Harry would have to die in order to bring about Voldemort's ultimate demise:
"And you knew this? You knew--all along?"
"I guessed. But my guesses have usually been good," said Dumbledore (Deathly Hallows, 599, hardcover).
The conversation that spurred Harry's question includes material dating back to Halloween '81, but also specifically mentions the events of the graveyard from GoF. So, "knowing all along" could refer to everything (i.e., Harry must die, Voldemort ignorantly tethered him to life, etc.) or just that Voldemort tethered him to life.
Other important information pertaining to this question can be found in OOTP, when Dumbledore confirms (if he didn't already know) that Harry contains part of Voldemort's soul. He uses the silver instrument to find out that Harry is just like Nagini, having the ability to share mind and soul with Voldemort. He also says the following:
"I guessed, nearly fifteen years ago," said Dumbledore, "when I saw the scar upon your forehead, what it might mean. I guessed that it might be the sign of a connection forged between you and Voldemort" (Order of the Phoenix, 826-827, hardcover).
While confirming that he guessed that Harry might share a connection with Voldemort from the very beginning, Dumbledore does not confirm with this statement that he knew Harry would ultimately have to give up his life.
In Philosopher's Stone, when Dumbledore drops off Harry on the Dursley's doorstep, we know he is not entirely truthful with McGonagall.
McGonagall asks: "How in the name of heaven did Harry survive?"
"We can only guess," said Dumbledore (Philosopher's Stone, 12, hardcover).
Of course, this was a lie. Dumbledore already knew how Harry survived, otherwise he wouldn't be delivering Harry to Lily's sister to extend the blood sacrifice. By proxy, he also knows that Voldemort will return b/c of Horcruxes, otherwise he wouldn't be so worried about Harry.
Finally, when asked in the same scene if he could remove the scar, Dumbledore says:
"Even if I could, I wouldn't. Scars can come in handy" (Philosopher's Stone, 15, hardcover).
So, did Dumbledore know at this very moment that Harry would have to die? Did he at least guess it to be true during this scene? We know he gains perfect confirmation in OOTP, but did he know it "all along," as a particular reading of the King's Cross interchange in DH would have us believe?