July 7 was a refreshingly cool day for summer in New York City. Morning showers made way for a partly cloudy afternoon, the ideal weather for walking among skyscrapers and marveling at such a remarkable metropolis. Only, your reverence was disrupted by talk of that terrifying building. A Midtown high-rise was on the verge of collapsing amid renovations — a stark reminder that even the greatest of ambitions can be felled by a buckling beam.

Author Colson Whitehead hopped on a video call with Gothamist a day after news broke of the tower’s structural instability. He agreed it was a concerning development. But as a lifelong New Yorker, Whitehead is always ready for the unexpected to occur.

“I’m excited about the mayor. I’m excited the Knicks won. That feels great,” he said. “But I don’t know, the city has these ups and downs.”

While celebrated for his Pulitzer Prize-winning fiction, Whitehead remains quite the realist. Woven into his books, such as “The Underground Railroad” and “Nickel Boys,” is an unvarnished understanding of how American history informs modern life. Whitehead’s Harlem crime trilogy adopts a lighter tone, thanks to its narrator’s wry sense of humor. But the thrillers are still saturated with bittersweet reflections on what it can be like to try making it in an ever-changing city.

On Tuesday, Whitehead will release “Cool Machine,” the final installment in a series that also consists of 2021’s “Harlem Shuffle” and 2023’s “Crook Manifesto.” The third book’s narrative picks up in the 1980s and continues to follow the misadventures of furniture salesman Ray Carney, who has padded his respectable income with shady business dealings ever since getting roped into an elaborate jewelry heist back in 1959.

“Writing about the ’80s, we’re coming out of the city’s bankruptcy and Wall Street is roaring again. There are new buildings going up,” Whitehead said of the novel’s setting. “But at the end of the decade, there’s the height of the AIDS crisis and the crack epidemic. As a lifer, I know that whenever you’re going up, the roller-coaster has to come down eventually.”

Living in the city shaped Whitehead’s early understanding of success. His entrepreneur parents and their four kids moved around the Upper West Side a fair bit during his childhood, often with the goal of ending up in a nicer home. In his younger days, not unlike Carney in “Harlem Shuffle,” Whitehead thought finding a place with decent square footage and good sunlight would solve all of his problems. (In that book, Carney aspires to own property on Strivers’ Row, a coveted destination among well-off Black American families.)

“And then of course, you move and you’re still the same person,” Whitehead said, laughing at himself. “It took me probably 15 moves to realize this horrible truth.”

It’s 1981 when we catch up to Carney in “Cool Machine.” Like Whitehead, who is 56 years old, Carney is now middle-aged. He and his wife, Elizabeth, are empty nesters in the Strivers’ Row home they were eventually able to afford. Carney knows he should be happy but can’t seem to shake his “crooked” past, as Whitehead’s narrator puts it.

He returns to unsavory behavior, helping pull off a heist at the Waldorf Astoria. In 1983, we follow his friend Pepper, an older man with an extensive history of criminal dealings, as he chases a thief through the East Village club scene. In 1986, the two men team up for one last outing.

The 1980s were formative years for Whitehead, who remembers visiting East Village nightclubs as a teenager. (The fictional avant-garde club Shoot the Hostages in the book is based on the World, which closed in 1991 after the owner was found dead inside.)

“I remember walking to Avenue B, Avenue C and being scared out of my wits,” Whitehead recalled, adding that now, “it’s a whole new world. There’s so much development. So many people have moved in that it’s unrecognizable.”

“Part of the book is preserving those last moments,” he said. “And also, accepting change.”

In 1983, Pepper briefly ducks into Downtown Beirut, an East Village dive bar that closed in the early ‘90s. That same year, Pepper debates the merits of Kiev versus Veselka, two Ukrainian restaurants in the area; today, only Veselka remains. Whitehead felt obligated to weigh in, noting that he was “more of a Kiev guy back in the day.”

Throughout the Harlem trilogy, Whitehead marks the passage of time by tracking progress on the construction of the Twin Towers, sky-high symbols of prosperity.

“Of course, we have this different perspective [now] on the changing city and what will happen to those two buildings,” Whitehead said. When construction is done, Carney and Elizabeth dine at Windows on the World, the restaurant once located on the 106th and 107th floors of the World Trade Center.

The change seems to be happening more rapidly these days. Whitehead found himself in Harlem recently and noticed that several of the average-sized buildings that existed just seven years ago, when he was location-scouting for “Harlem Shuffle,” had been replaced with high-rises.

Whitehead recognizes that change can be difficult, especially when it affects the livelihoods of loved ones and communities you cherish, but at the same time, he remains rather matter-of-fact about the circle of New York City life. Stuff happens. Things evolve. It’s the people who make a place, even if it can feel like the city has a formidable agenda of its own.

“Carney’s question that keeps coming up is, ‘Escape from New York? Where would you go? You’re deluding yourself,’” Whitehead said.

“But that’s Carney,” he continued, differentiating himself from the character. Whitehead plans to stay in the city for the time being, he said, given that his younger child is about to enter the seventh grade. But once his son goes to college? It’s anyone’s guess.

“Maybe I’ve done my time. We’ll see. I mean, I love New York, and it’s obviously a great influence and a great inspiration. But there are other places, too.”