Tracy Kidder didn’t set out to write a book about rural medicine, tuberculosis and AIDS in Haiti. Or education in America. Or the development of a super computer. And when he first met Dr. Jim O’Connell in Boston, he wasn’t thinking about writing a book about homelessness.

“I’m interested in telling stories,” he said in a recent interview with the Gazette. “And the engine of any good story is the human being or a group of human beings. You get interested in the person first of all. You want to understand what they’re doing, why they’re doing it and what they’re up to. I always hope to grab onto a story that has some weighty subject behind it.”

In Rough Sleepers, published by Random House this past January, he has again used an approach to narrative nonfiction that has won him a Pulitzer Prize and countless devoted readers: writing about serious issues by telling the stories of extraordinary individuals tackling them.

Rough Sleepers tells the story of Dr. Jim O’Connell’s detour after Harvard Medical School into what was to be a yearlong fellowship working with a health clinic at Pine Street Inn, a Boston homeless shelter. Nearly 40 years later, Dr. O’Connell is still doing this work, as president of Boston Health Care for the Homeless. And his personal, holistic approach to treating the complex behaviors and medical co-morbidities associated with living on the streets has made the organization a national model.

Dr. O’Connell will take part in the book festival this year, however Mr. Kidder will not be able to attend due to his recent need for non-elective back surgery.

Mr. Kidder knew of Dr. O’Connell through Dr. Paul Farmer, founder of Partners in Health and the focus of his 2003 book Mountains Beyond Mountains. Paul English — whose founding of Kayak.com was depicted in Mr. Kidder’s 2016 book A Truck Full of Money ­— later introduced them.

Mr. Kidder traveled with the doctor and the clinic’s street outreach team that offers aid to Boston’s “rough sleepers” — unhoused people who sleep on the streets, in parks, outside buildings. By 2017, Mr. Kidder began focusing on the possibility of writing about the clinic’s work and the challenges facing the unhoused.

The author continued to ride with team on overnight ministrations, talking with Dr. O’Connell, the medical professionals surrounding him and the patients who return not just for food, medical care and housing referrals, but also for the personal warmth Dr. O’Connell and the staff offer.

Tracy Kidder's book focuses on Dr. Jim O'Connell's advocacy for the homeless.

“I wanted you to get a sense that these people are just like you and me,” Mr. Kidder said. “They have had worse luck of one sort or another. It’s easy to imagine that all these people are somehow different, that they’re alien or somehow primitive. It’s just America — if you’re poor, people assume it’s your fault.”

One of those patients was Tony Columbo, who dominates sections of Rough Sleepers. Mr. Kidder remembers Tony as a colorful speaker who loved to talk. He has approximately 1,000 hours of recordings of him, most of which the author transcribed himself because Tony talked so fast he couldn’t take notes.

“Here was a guy who never really had much of a chance but he was trying really hard,” Mr. Kidder says. “He would defend the weak and vulnerable among the other homeless people. Women called him ‘the night watchman.’”

Altogether, Mr. Kidder spent five years with Dr. O’Connell and his team.

“If the pandemic hadn’t intervened, I’d probably still be out in that van with Jim, still riding around and still writing,” he said.

That immersion and focus is typical of the author’s writing process.

“I love doing the research,” he said. “It’s not a chore. I can’t read everything that’s been written on a subject but I do talk to people who really know their way around it.”

But all that research takes time, and Mr. Kidder expresses gratitude to his wife for supporting their family, especially during the early years of his writing.

“I was 34 or 35 when I wrote The Soul of a New Machine,” he said of his first published book. “I was struggling. All of a sudden that book won a Pulitzer and a National Book Award. It looked like I had a chance to do this for a living. And I did. I got lucky. The next book did well and the book after that did well. It was a great privilege.”

Mr. Kidder, a Northampton-area resident, says that Cape Cod holds special meaning for him. Though he grew up on Long Island, his family spent a month each summer in Woods Hole.

“My grandmother had a house there,” he recalls. “It was a beautiful old place that was falling apart but it was like Valhalla to me. My father was an old Navy man and always had a boat that we would take up to Woods Hole. It was quite magical.”

“We would sail to the Vineyard. I remember Menemsha Bight. This was in the 1950s and Menemsha was just a little fishing town. It was beautiful.”

Mr. Kidder has been conducting his book tour, over Zoom and in person, often with Dr. Jim O’Connell. Nearly 10 years after their first meeting, he remains inspired by his friend.

“Jim makes you realize that wonderful things can be done in what look likes impossible situations,”

Dr. Jim O’Connell will take part in a conversation with Don Berwick at 9:50 a.m. on August 6.