Employees say the inflexibility of scheduling upended their personal lives. The companies say they maintained service while using fewer resources.To defuse a labor dispute that brought the nation to the brink of a potentially catastrophic railroad strike, negotiators had to resolve a key issue: schedules that workers say were punishing, upending their personal lives and driving colleagues from the industry.Workers, industry analysts and customers say the practices emanate from a business model that focuses relentlessly on holding down expenses, including labor costs. They say this leaves rail networks with little capacity to work around a disruption, whether it be a personal issue for an employee or a natural disaster like a hurricane — or, for that matter, a pandemic.Negotiations in which the Biden administration took an active role produced a tentative contract deal announced early Thursday. The agreement included a significant pay increase for the workers, whose base wages typically start around $50,000 and top out around $100,000, excluding overtime and benefits. But scheduling was the sticking point.Unions complained that to manage a shortfall of employees, the carriers effectively forced their members to remain on call for days and sometimes weeks at a time, partly through the use of strict attendance policies that could lead to disciplinary action or even firing. They said the policies pushed workers to the limits of their physical and mental health.“Every facet of your life is dictated by this job,” said Gabe Christenson, who until this year worked as a conductor for a large freight rail carrier. “There’s no way to get away from it.” Carriers said employees could take time off through paid vacation, income replacement for sick workers or removal of themselves from the list of available workers.“Railroads provide multiple ways for employees to take time to care for themselves and their families,” the Association of American Railroads, an industry group, said in a statement earlier this week.By Sunday, leaders of 10 of the 12 unions in the talks had agreed to contract terms. But two unions representing conductors and engineers — about half the 115,000 freight rail workers involved in the dispute — held out for a concession on scheduling, like the ability to see a doctor or attend to a personal matter without risking disciplinary action.President Biden in the Oval Office on Thursday with representatives of the railroads and the unions as well as Labor Department officials.Doug Mills/The New York Times“It would not harm their operations to treat employees like humans and let them take care of medical issues,” Dennis Pierce, president of the Brotherhood of Locomotive Engineers and Trainmen, one of the two unions, said in an interview on Monday. “It’s the primary outstanding issue, one we won’t budge on — the request that they stop firing people who get sick.”After the tentative deal was announced, the two unions said it included “contract language exempting time off for certain medical events from carrier attendance policies.” The agreement will require ratification by union members, a process that could take a few weeks.In some respects, the freight rail industry is similar to other swaths of the economy, such as retail and food service, where employers have imposed increasingly lean staffing in recent decades.Rick Paterson, a longtime industry analyst with the investment bank Loop Capital, said the staffing trend for railroads became more pronounced in the early 2000s when, after years of consolidation, carriers and their investors began to recognize that they had pricing power.As a result, the dominant business model in the industry shifted from one in which the carriers sought larger volumes of traffic to one in which they sought to increase profits by raising prices and lowering expenses like labor costs.“They realized that if growing pricing is good for margins, then keeping costs low is even better,” said Mr. Paterson, who has referred to this thinking as “the cult of the operating ratio,” after the ratio of operating expenses to revenue.A freight train yard near the Port of Los Angeles on Thursday. A strike by freight rail workers would have been economically damaging.Alex Welsh for The New York TimesThe side effect, however, was to gradually eliminate any cushion in staffing levels.Unlike many workers, the conductors and engineers who operate trains don’t get weekends or other consistent days off.Instead, said Mr. Pierce, the president of the locomotive engineers union, workers go to the bottom of a list of available crews when they return home from a trip that can last days. The fewer the workers, the shorter the list, and the less time it takes for them to be summoned into action again.“It can go on indefinitely, till they interrupt the cycle by taking paid time off, which the companies routinely reject,” Mr. Pierce said.Major U.S. freight rail carriers began to accelerate the staffing cuts in recent years as they switched to a system known as precision scheduled railroading, or P.S.R., which focuses on scaling back excess equipment and employees and streamlining the shipping process. The industry has said P.S.R. enables carriers to run more efficiently and provide more reliable service, while also improving profits. Freight rail customers and employees say it has resulted in deteriorating working conditions and customer service and little resilience in dealing with unforeseen circumstances, like weather emergencies. The Surface Transportation Board, a federal regulatory agency, estimates that the carriers have 30 percent fewer employees today than six years ago.Reducing labor to match this operating model may have been sound in principle, said Mr. Paterson, the industry analyst. But he said the carriers appeared to have cut back too much to allow them to handle potential disruptions, of which the pandemic was an epic example.“When you do P.S.R., you can drop your head count by 30 percent, but why don’t you drop it 28 percent and build in a crew reserve?” he asked. “That didn’t happen.”With little margin for error, carriers found themselves with too few workers to operate their rail networks once business began to recover in the second half of 2020, putting more and more stress on their workers, and making it even harder for them to take time off.Freight rail workers on train tracks in Atlanta on Thursday.Dustin Chambers for The New York TimesWhen Mr. Christenson, the longtime conductor, who is also a co-chair of the industrywide group Railroad Workers United, began feeling run-down last year, he was reluctant to see a doctor. Under his company’s attendance policy, taking an unplanned day off could lead to disciplinary action, and “I worried about triggering an investigation,” he said.So he waited until he could get an appointment on a scheduled day off a few months later, at which point he got bad news: He had an infection that might have been easily resolved with medication but now required surgery.“They had to cut infected tissue out in my leg,” Mr. Christenson said.Railroad workers and their families, many of whom asked to remain anonymous for fear of reprisals, said similar attendance policies, which are partly intended to manage the industry’s labor shortfall, had resulted in workers’ missing important life events.This year, for example, BNSF Railway introduced a new point system for some employees, according to a February memo obtained by The New York Times. Under the policy, workers were awarded 30 points to start with and would lose points — from two to 10 — for scheduling a day off for a variety of reasons, including a family emergency, sickness or fatigue. They lose even more points for being unavailable at the last minute.When workers run out of points, they face escalating penalties, starting with a 10-day suspension, followed by a 20-day suspension and ending with possible firing. Workers can earn back points by being available for two weeks straight. BNSF said on Thursday that the policy was “designed to improve the consistency of crews being available for their shifts” and to give employees more “predictability and transparency” regarding their schedules. It said that the program was achieving those goals but that revisions had been made to give employees more flexibility. One railroad worker said the fast turnaround time between shifts had forced him to skip doctor’s appointments to address his symptoms of long Covid. Railroad workers’ family members said they rarely celebrated birthdays or holidays together even before the pandemic.Workers say that while they have paid vacation and days allotted for personal leave, the constraints that employers impose — like requiring vacation to be taken in limited windows that are far oversubscribed, or simply rejecting a proposed personal day — severely limit their options as a practical matter.Shippers have grown frustrated, too.Rail cars full of grain sat at production facilities in the Midwest for weeks at a time earlier this year, far longer than typical, said Max Fisher, the chief economist and treasurer for the National Grain and Feed Association.Chemical manufacturers, which rely on freight rail to move their products, have grown increasingly frustrated with the carriers since December, according to three surveys by the American Chemistry Council, an industry association. The latest, conducted in July, found that 46 percent of the companies felt that rail service was getting worse, while only 7 percent said it was improving.“Freight rail has been a constant thorn in our side and been a significant challenge for our members for quite some time,” said Chris Jahn, the organization’s chief executive.While the labor agreement announced on Thursday may avert a strike, it is unlikely to resolve the deeper issues that have put unions and rail carriers on a collision course. Even if carriers wanted to turn back the clock on efforts to increase efficiency, they would have shareholders to answer to.After Bill Ackman, the activist investor, won a proxy battle over the freight carrier Canadian Pacific a decade ago, the company hired Hunter Harrison, who pioneered P.S.R., as its chief executive. Mr. Harrison imposed the system there and then at CSX after joining that company in 2017, prompting investors to pressure other carriers to follow suit to eke out similar efficiencies.“Lurking in the background is the constant threat of shareholder activism if any of the railroads’ operating ratios become outliers on the high side,” Mr. Paterson said in testimony to the Surface Transportation Board this spring. More