Several years ago I read the plot synopsis on Wikipedia (bad form, I know) for a sci-fi story with an intelligent parasite that infected humans. The parasite adapted to all attempts to defeat or drive it out (e.g., by growing a hard exoskeleton on the affected person). The plot twist was that the parasite was conscious, and I believe the end of the book involved a woman "saving" her husband from the parasite by telling it that she would find it a new host if it would spare her husband.
Sorry for the kind of incoherent summary, it's been a long time since I read it.
For years I labored under the assumption that this story was Jeff Vandermeer's Annihilation, but I recently read Annihilation and it definitely isn't.