Theodoric James Jr. worked in the White House for almost 50 years. (White House/White House)

The District’s Office of the Inspector General is looking into whether city agencies could have done more to prevent the death of Theodoric C. James Jr., the longtime White House employee whose friends and family had for months tried to get him help.

James, who had served under every president from John F. Kennedy to Barack Obama, had been showing signs of instability for about two years before he was found dead Aug. 1 inside his home during a brutal heat wave. He had stopped bathing. He wore the same tattered and fetid clothing. He went to the bathroom in buckets on the front porch of his Northwest Washington home.

Concerned that James, 71, was a threat to himself, his family and neighbors called every city agency they could think of, including Adult Protective Services, the Department of Mental Health, council members and the mayor’s office.

But James repeatedly turned the city’s social workers away, saying he did not want help.

After James’s death from heat exposure, Mayor Vincent C. Gray said the city had to respect the wishes of those who refuse treatment.

“A number of efforts were made,” he said. “Unless you can demonstrate a danger to themselves or others, they get to make their own decisions, flawed as they may be.”

Still, Gray (D) asked Deputy Mayor Beatriz “B.B.” Otero for a “thorough investigation” of the case. Otero oversees the agencies that might have intervened. The results of that investigation have not been released.

It is not clear when the inspector general’s report will be completed or what recommendations might come with it. But an official with knowledge of the review said it would “determine the extent and quality of the District’s response.”

D.C. Council member Jim Graham (D-Ward 1), who chairs the Human Services Committee, said he welcomed the inspector general’s investigation. “We also might have to review the adult protection provisions in D.C. law,” he said. “I think what happened to Mr. James may require us to do so, since very troubling questions are raised.”

For nearly 50 years, James, whose story was chronicled in The Washington Post in August, worked in the White House Office of Records Management, where he read and catalogued many of the documents that flowed through the Oval Office: letters, memos to presidents, pieces of legislation, nomination packets, even classified material for which he had to have a security clearance.

In his 16th Street Heights neighborhood, he was known as a distinguished gentleman who swept the entire street and liked to talk philosophy with his neighbors.

But a couple of years ago, he started to struggle and retired from the White House. He was hospitalized twice for dehydration and malnutrition, his family said. He dressed shabbily and smelled. And his property fell into disrepair. All were clear signs he desperately needed help, his friends and neighbors said.

Last summer, the city sent a hazmat crew to remove 10 buckets of human feces and urine from James’s porch, charging James $1,895. Earlier this year, it sent a contractor to fix the rotted wood on his deck, scrape away peeling paint and repaint the surfaces. He was charged $6,035.

After his death, the citations kept coming. Nine days after he was found dead, the city’s Department of Consumer and Regula­tory Affairs affixed two $500 citations to the plywood board that the city put up to cover his front door. They were for excessive vegetative growth and debris. Last month, the city issued him another $500 citation for growth and debris.

Family and neighbors said the last citation was unfair. “It’s piling on,” said Alex Dobbins, who lived next door to James for 37 years.

Helder Gil, a legislative affairs specialist for DCRA, said the department treated James’s property as it would any other.

“The property maintenance standards still apply,” he said. “We don’t look at it from what the owner’s personal history may have been.”

James’s brother and sister-in-law, who live in Mississippi, hired an attorney who helped negotiate down some of the other outstanding liens and fines, which still totalled nearly $10,000. The most recent citation was waived. All the others have been paid, Gil said.

About a month after her brother-in-law died, Avee James received a call from the mayor.

“He said he was sorry,” she recalled. “He expressed his sympathy and said that whatever they could do to help, they would be there.”

Staff writer Mike DeBonis contributed to this report.