[What you need to know to start your day: Get New York Today in your inbox.]

Jose Polanco lives in one of the worst buildings in New York City. In his 18 years there, the apartment has had leaks, mold, roaches and rodents — sometimes all at once. Last winter, Mr. Polanco was stepping out of the shower when the bathroom ceiling collapsed.

His neighbor had it even worse; his pet parrots were eaten by rats.

The city is aware of the issues in the West Harlem building. Over the course of a decade, it has sued the landlord over hazardous conditions 21 times and could have imposed as much as $900,000 in fines. But each time, officials accepted a low settlement and the landlord’s promise to make repairs.

Often, the repairs were quick-fix solutions — like a fresh coat of paint on a moldy bathroom ceiling — that did not solve the underlying problem.

“They would come and patch it up every year,” said Mr. Polanco, 68, a retired maintenance worker who pays $1,500 a month in rent. “It was the same leak every time.”