I think the real headaches start in WN. Everything before that can be directly linked to someone clobberin' Harry over the head.
More specific: I think the cause for the headaches happened in Camp Kaboom. Mainly because of the one quote in WN, when Harry gets a headache when he remembers New Mexico and is abruptly stopped in his thought process. To me, it has the same feel to it as the "Sight-hickup", he talks about when meeting Rashid. Like something is triggering a memory, but it gets blocked. SmF headaches are similar to that. Maybe Lash blocking a memory of the Sight, where Harry asked her to do so. Or Harry cut of a part of his soul, that held the memories, kind of like Bob did.
Now however Harry might have gotten infected, I don't think he himself actually is infected. Instead, I think Lash has been infected by the Nemesis that somehow got into Harry's head. Her infection would have happened at the end of WN in my eyes, when she sacrificed herself to safe Harry. But contrary to what Harry believes, she was not killed, she was severely injured and weakened. Nemesis used that to catch a ride out of the Cave, and has since healed and turned Lash.
So this is the parasite: a Nemesis turned Lash.
But I was thinking along a different angle, too. We know that someone or something is causing Harry to have headaches. The time seems to be set somewhere in WN or SmF. The question remains, who is causing them?
And then I thought of the people we know have been in Harry's head. There's Mab and Lash of course. Lea I'm not sure of, I don't think she actually did some remodeling like the others. On the other hand, she could just as well have, if her contract with Maggie sr. allows for such a thing. Then again, since Mab took over Lea's duties and she could meddle in his head, we can't exclude her entirely.
But there is someone else who got into Harry's head. Two actually, now that I think about it:
First, there's his mother. I'm still not sure how she managed to link herself to both Harry and Thomas. Thomas, sure. She probably had plenty of time after he was born to put a spell on him. But on Harry? She died when she gave birth to him. And unless she put it into her death curse, I don't see how she could have done it. But she was definitely in his head, however she may have done it. One possibility would be, that she somehow put part of herself into the pentacles ahead of time, and when Thomas and Harry touched them, that part of Maggie went into them, just as any of the Denariens do. But however she did it, she was in Harry's head. We know of one thing that she did there, confirm that Thomas is his brother, but she could have done all kinds of things there. Hell, maybe that's part of what made Lasciel's shadow transform into Lash.
And someone else who got into Harry is Kravos. I think it was established that he had been infected by Nemesis, and if it hasn't, I will just assume so anyway. How did Harry defeat Kravos? He friggin' ate him. He ate Kravos power, his essence, his soul. If Kravos was infected by Nemesis, how likely do you think it is that Harry did not get that, too? I know, there aren't any signs that he has been infected that early on, but nonetheless, that's something to think about. In the light of CD, and looking at how inside-Harry had dressed her in a prison jumpsuit, maybe inner-Harry has locked away Nemesis inside of Harry's brain, too. As a prelude to Harry's responsibilities as the Warden, so to speak.