Eric O'Neill (Ryan Phillippe) is a young FBI employee assigned to work undercover as a clerk to Robert Hanssen (Chris Cooper), a senior agent he is told is suspected of being a sexual deviant. Hanssen has been recalled from a detail post at the State Department to FBI headquarters ostensibly to head up a new division specializing in Information Assurance. Initially, Hanssen insists on a strict formality between the two men. He frequently rails against the bureaucracy of the FBI and complains that only those who regularly "shoot guns" are considered for senior positions instead of those, like himself, who are involved in vital national security matters. He calls the bureau's information technology systems antiquated and laments the lack of coordination and information exchange with other intelligence agencies.Eventually, Hanssen becomes a friend and mentor to O'Neill and takes a personal interest in him and his wife Juliana (Caroline Dhavernas), who is suspicious of Hanssen and resents his intrusions. A devout Catholic who is also a member of Opus Dei, Hanssen urges O'Neill, a lapsed Catholic, and his secular East German-born wife to become active churchgoers.O'Neill finds no evidence of Hanssen leading a secret double life and develops a growing respect for his boss, so he confronts his handler in the undercover assignment, Kate Burroughs (Laura Linney), and she admits that the sexual deviance allegations are only a secondary consideration. Hanssen is suspected of spying for the Soviet Union and Russia for years and being responsible for the deaths of agents working for the United States. He learns that FBI Director Louis Freeh is personally leading the investigation.While the FBI could arrest Hanssen under lesser charges, they want to catch him in an act of espionage, so they can threaten him with the death penalty for treason and possibly induce him to divulge the information he has compromised. O'Neill is ordered to obtain data from Hanssen's Palm Pilot and keep him occupied while FBI agents search his car and plant covert listening devices in it.The tracking devices in Hanssen's car cause interference with the radio, which makes Hanssen suspicious. He also wonders why he was placed in an isolated position in the FBI only a few months before he's scheduled to retire. He tells O'Neill he believes he is being watched by Russian agents. The FBI intercepts a message he sends to his Russian handlers saying he will not provide any more information. O'Neill persuades Hanssen that he is not being trailed by the Russians or by him on behalf of the FBI. With his confidence restored, Hanssen makes one last dead drop of stolen information, and the FBI catches him in the act.Although he is assured promotion, O'Neill is discouraged with the toll the case has taken on his marriage and opts to leave the agency. When O'Neill leaves his office with his belongings, he unexpectedly encounters Hanssen in an elevator being escorted by arresting officers. Hanssen tells O'Neill to "Pray for me" and O'Neill promises that he will.
Output: Question: Why does O'Neill have a growing respect for his boss?, Answer: Because O'Neill finds no evidence of Hanssen leading a double life.