I just saw this movie yesterday for the fifth time, so I think I can answer your question accurately. I think Cole knew all along, from the first time he met Malcom, that he was dead. You'll notice in the church scene that Cole is playing with his soldiers, completely engrossed, when Malcom enters the room and stands beside Cole. When Cole notices that Malcom is there, he looks at him in shock, and sits rigidly, like when the ghost came into the kitchen and opened all the cabinets. Malcom says to Cole, "It's alright. Don't be scared," which is an odd thing for your psychologist to say to you, especially if he was supposed to meet with you that day. Usually, when you have a psychologist at nine years old, your mom gets you the psychologist and, of course, knows you have a psychologist. Well, there's just one problem with that: Cole's mom doesn't know about his problem. Don't you think the mom would know her kid has a problem before she gets him a psychologist? Cole confesses that his mom doesn't know his secret to Malcom when they're walking down the street when he says, "I don't tell her things." Another big clue is when Cole comes home from school to see Malcom sitting in a chair across from his mother and she doesn't mention Malcom at all, almost like she can't see him there, which she cannot. Cole makes no mention of him either, because he knows she cannot see him, and it would scare her. Then, of course, the advice Cole gives to Malcom at the end gives it away. I hope that answered your question! Actually, I asked myself the same question after watching the movie yesterday. It's a very good question.