Last weekend, my boss called me at home to tell me that Michael Tyson, a patient in custody in the New York City jail system, had died. He was 53 years old. His was the first covid-19-related death of an incarcerated patient under our care. Rikers Island, where I am a geriatrician and palliative-care doctor, already had more than 300 confirmed cases of the virus. We’d been grimly expecting to lose patients to the pandemic.

I did not take care of Mr. Tyson directly, but I had been speaking with his hospital doctors and attorneys: We’d hoped to free him before he passed, but he wasn’t released before it happened. This makes the circumstances of his death seem like an accident of timing — as though they didn’t result from a decision someone had made and then tacitly renewed by refusing to unmake it. And there is truth to that: He was being held on a parole violation, and the parole apparatus often does seem to crank like a rusty, autonomous cruelty machine. Once someone becomes trapped in its gears, it’s hard to pull them out or to identify the engineer — the lawyer, the judge, the bureaucrat, the parole board member, the governor — who can intervene. But there are usually multiple people along the way who have kept the cogs grinding.

My job is to take care of the oldest and sickest patients on Rikers Island. I see preventing deaths in custody as the core of my work. Sometimes this means trying to stop suicides, overdoses and injuries before they happen; sometimes it means diagnosing and treating serious illnesses. But occasionally people are just dying, because they have an incurable disease or frail bodies too tired to fight. For these patients, while death isn’t preventable, death in custody still is. In such cases, we work to pursue “compassionate release.” For a patient in pretrial detention — someone still, nominally, presumed innocent — this often just means finding an alternative to jail: home, care at a hospital, admission to a nursing home.

When people imagine those stuck behind bars at Rikers, they don’t typically picture the people I take care of. My guys are old men, bent and hesitant as they trudge down the hall with their walkers; paraplegic patients dependent on nursing assistants to turn their bodies and change their soiled diapers; young people with advanced cancer, handcuffed as they’re taken to the hospital for chemotherapy; patients too demented to know exactly why they’ve been arrested. According to our census records, nearly 15 percent of the New York City jail population is over the age of 50. I have taken care of many incarcerated people who were over 80, even over 90.

The jails are a terrible place to be very sick. This isn’t the fault of our medical staff, whose commitment inspires me daily. Individual acts of tenderness abound: a doctor rolling her eyes maternally at a favorite patient bragging about his girlfriend; an officer cajoling a recalcitrant patient to go to his physical therapy appointment; nursing assistants carefully drawing a privacy screen around a bed, murmuring reassurances before dressing someone’s wounds. But by their nature, jails are places characterized by violence, indifference and mistrust. The pain or nausea my patients may feel because of disease compounds the discomfort of being locked in a pen or a cell or a dorm, often with dozens of strangers. Their movement is restricted, as is any opportunity to exercise personal agency — to choose your clothes or food, to turn the lights on and off at will, to go outside and feel the sun, to take medicines on your own schedule. This limits my ability to truly alleviate physical discomfort. It’s hard to make someone’s back pain better when he spends the day lying on a hard cot. It’s hard to help someone sleep when he fears what will happen to him when he drifts off.

The challenges of treating physical symptoms aren’t the hardest part of providing palliative care. The vast majority of my patients are being held in pretrial detention or for parole violations. The average length of jail detention is about 73 days, but I have taken care of patients who have been in pretrial detention for six years. They are trapped in a kind of waiting room, unsure which door will unlock — the one that sends them to the prison system upstate or the one that releases them back to the community. Existential distress is the experience held in common by the jailed and the dying alike. For those who are sick and incarcerated simultaneously, suffering sometimes emanates from their bodies, and there are moments when the least I can offer and the most I can do is bear witness. It can be difficult to tolerate proximity to so much pain. I often leave a patient interview, exit security at the jail’s front gate and feel the need to drive immediately off the island.

When I took care of dying patients in clinical or home settings during my medical training, I oriented conversations around a dual agenda: I tried to help them understand their diagnoses, and to create meaning and moments of control in their final days. Some patients cared passionately about maintaining small vanities even as their health declined, and we’d talk about getting their nails done or about where to buy a wig. Others wanted to live to see a daughter’s graduation, or a grandchild born, and we’d circle those dates on the calendar and think about what would have to happen to get them there.

These conversations go quite differently in jail. I’m embarrassed to think of how, when I started this job four years ago, I clumsily used stock phrases to get to know my patients — prompts like, “If your time is short, what is most important to you now?” Did they want to eat their mother’s cooking again, relive a favorite vacation, see a child get married before they died? Sure. But they were cut off from those opportunities. My conversations with incarcerated patients now revolve around different objectives: to think about how they might make meaning while stuck in the cage, and to figure out if its door can open before their time is up.

The palliative-care physician Ira Byock talks about the “tasks of the dying”: to say I love you, I’m sorry, I forgive you, thank you and goodbye to the people you have been close to. My patients can often do this, if it is important to them, by phone or letter or during visiting hours. Once, for a patient in his 80s, I arranged a family meeting between him and his estranged son. I knew this patient as a stoic former Marine who had significant dementia; he was mostly quiet when I visited his bedside in the housing area and, when I asked how he was doing, would gruffly reply, “All okay.” The minute he saw his son, he burst into tears. I learned more about him in those 35 minutes than I had over the prior year.

Other times, the urgent task for my patients is to tell their story. Several have said that what they fear most is that they will spend their last moments unknown to the people around them, and forgotten by people on the outside. For these patients, my team has sometimes conducted and recorded structured interviews, inviting them to recount the highlights of their lives for posterity.

But sometimes the patient is too sick to do any of this. Then the work is up to the rest of us. We can make someone’s experience of leaving this world less sorrowful when we do our utmost to honor their dignity, and the complexity of their identity and life experience. To do that, it is imperative to open the cage. The people who hold the keys — politicians, corrections commissioners, district attorneys and judges — must recognize that allowing a person to die in custody is a death sentence delivered regardless of the crime. In anything called a justice system, a death in such circumstances is a failure.

There is potential for many detainees and prisoners to die of covid-19. “Social distancing” is impossible in correctional facilities. People sleep on cots four feet apart, share bathrooms, sit in a small common space to watch television and gather for therapy sessions. Every day, staffers move among housing areas and in and out of the jails, potentially exposing dozens to contagion. Despite the health service and the Correction Department’s best efforts to identify, test and quarantine potentially infected people, the New York City jail system is set up perfectly for viral spread. People are getting very sick. Mr. Tyson was one of them.

I didn’t know Mr. Tyson, and can’t speculate on what work he didn’t get to do as he lay dying in the hospital with a corrections officer outside the door. I do know that decarceration on a mass scale is an urgent public health demand and an outbreak mitigation strategy — and that such population-level concerns should not obscure the individual implications of removing the constraints of unfreedom for each person who is released. No one deserves to die in handcuffs.

Twitter: @rachaelbedard