Heat lamps at some T shelters keep Newton, Brookline riders toasty. Elsewhere, they just don’t work.

The T has heaters installed at some bus and trolley stations, but those that connect Nubian Station to downtown have long been out of service, riders say.

On Thursday morning, Rachel Diez ushered her godson, 6-year-old Julian, into a bus stop shelter in Roxbury, both trying to evade a cutting wind as the winter weather in Boston finally turned colder.

At 37 degrees, it was chilly enough to set Julian’s teeth chattering. As the pair stood shivering, above them hung a source of potential relief: a heat lamp inside the roof of the bus shelter on Washington Street.

But its bulbs were cold and lifeless; the heat lamp hasn’t worked in years.

The night before, Alana Reiss had better luck: a toasty spot underneath a working heat lamp inside the shelter at the Green Line Chestnut Hill station.

“It’s winter, and I’ve already been outside today, so I’d rather not be cold,” said Reiss, a teacher at the nearby Chestnut Hill School.

The two scenes, fewer than 5 miles apart, capture the starkly different realities of a little-known perk the MBTA installed years ago on the D Line that runs through Brookline and Newton, and the Silver Line between Roxbury and Chelsea. Nearly all the heat lamps on the transit line along the white, wealthier neighborhoods work; most of those at on lines serving neighborhoods of color don’t.

Jarred Johnson, executive director of TransitMatters, called the difference “somewhat” surprising, but said the Silver Line is known as a particularly unreliable ride.

“I would imagine that [with] the D, perhaps it’s just more continued pressure from the legislators, some of the electeds along that line,” Johnson said.

The Globe visited every transit shelter that had heat lamps or vented heaters, according to an inventory provided by the agency: 12 on the D Line and 27 on Silver Line routes 3, 4, and 5 — divvied up between 26 stops in all. The largest number of nonfunctional heating lamps are in Boston, on the Washington Street stops of the Silver Line. Nearly all heaters worked on stops serving Newton and Brookline, where the median household income was $176,373 and $130,600 as of 2022, respectively, according to US Census data. In Chelsea, the median income is $71,051, according to the census; in Roxbury, the median income was $27,721, according to the latest available data from the Boston Planning and Development Agency.

A warm wait? Not for everyone.

Some MBTA shelters have heat lamps installed to keep riders warm while they wait, but on the Silver Line to Roxbury, few actually work. It's a different story in Chelsea and the western suburbs, where warmth comes at the push of a button.

T spokesperson Lisa Battiston said the agency is working to repair and upgrade amenities such as the heating lamps, but with a seemingly endless list of fixes confronting the beleaguered agency, those involving safety and basic operations may take priority.

Battiston said the agency is working “to balance different, leading priorities with budget constraints and aim to make improvements that best serve all riders.”

The T said it was checking into the disparity.

The age of the heaters could be one factor. The heaters at shelters on the Washington Street stations are the oldest, installed in the 1990s. Those on the D Branch were mostly installed in the early 2000s, according to the T, while the the Silver Line 3 in Chelsea, which went into service in 2018, has six functioning lamps and two that don’t work.

At times, trying to get the decades-old lamps to work elicited laughter from people waiting at shelters on Washington Street. Sometimes, “just for fun,” Diez told the Globe laughing, she hits the button that reads, “Push for heat,” to see if it works.

It never does.

Many riders said working heaters would make waiting for the bus more comfortable in winter, but they expressed doubt the T would ever turn them back on.

And yet over at Chestnut Hill, Reiss told the Globe the heated shelter along the D Line is a reliable spot of warmth on cold nights. The 24-year-old said she usually steps inside any time her train is more than four minutes away.

Stacy Thompson, executive director of LiveableStreets Alliance, said the nonfunctional heat lamps make waiting for a bus less pleasant, but they are just one factor in an overall uncomfortable system, especially around Nubian Station.

“This is part of a larger and more complex problem about how to make places where people wait for transit more comfortable,” Thompson said. Heaters are an issue right now, but “within six months it might be that it’s too hot and sunny, and there’s no shade.”

The agency needs a staggering $24.5 billion for repairs and replacements to its decrepit track, stations, trains, signals, and other assets. Miles of train tracks, including new ones built incorrectly, are being repaired over months of intermittent shutdowns. All the while, federal regulators are watching closely following a series of near-miss incidents involving workers spurred by poor safety protocols.

Heat lamps are a staple of some transit networks in similarly cold climates. In Minneapolis, the local Metro Transit agency has them at hundreds of bus and rail shelters; the Chicago Transit Authority turns on more than 1,000 heaters during the cold months; and the Toronto Transit Commission installed 16 heated “Access Boxes,” similar to those on the D Branch, near key routes in 2020.

Installing new heating lamps requires electrical infrastructure that may not be available at all bus stops, and the heaters themselves are vulnerable to vandalism, making them a less cost-effective amenity, according to the T.

The agency said it currently has no plans to install new heaters. Still, Thompson said, “if they have equipment that already exists and is not working, that is a problem.”

Johnson said fixing such amenities can be done relatively quickly and may have an outsized impact on riders’ perception of the agency. He said the T should not give people additional “excuses not to ride,” and comfort and reliability go hand-in-hand to create a positive experience.

“I would imagine on some days, it’s a serious deterrent to riding,” Johnson said.

The T reports eight heating lamps on the Silver Line 3: one each at the inbound and outbound platforms of the Eastern Avenue, Box District, Bellingham Square, and Chelsea stops. Six of those worked when the Globe inspected them Dec. 28; lamps at the inbound Bellingham Square platform and outbound Chelsea platform failed to turn on.

Of the 12 Green Line stops between Riverside and Kenmore, 10 have fully functional lamps. One of the two bulbs at Brookline Village stop was out when tested by the Globe, but the shelter was still warmed by the one working bulb. No heater could be found at Brookline Hills, where the T recently rebuilt the station.

Other than a handful in Nubian Square, Roxbury, none of the heat lamps on the Silver Line 4 or Silver Line 5 worked when tested late last month.

At one shelter on Washington Street last Thursday morning, John Mehlenbacher waited for the Silver Line 4. A transplant from Toronto, he stood without a jacket, allowing that he’s “a little used to the winter.”

On an above-freezing day, he said he could manage, but he was less certain about the rest of winter.

“It’s not that cold yet, right? But I feel like it might get colder in the coming months,” Mehlenbacher said. “It would be nice to have. For sure.”