The president and his negotiators believe they worked out a deal that allowed Republicans to claim big spending cuts even as the reality was far more modest.Shalanda Young couldn’t sleep.A small team of Biden administration officials had spent the past two days in intense negotiations with House Republicans in an attempt to avert a catastrophic government default. Ms. Young, the White House budget director, had been trading proposals on federal spending caps with negotiators deputized by Speaker Kevin McCarthy, whose Republican caucus was refusing to raise the nation’s $31.4 trillion borrowing limit without deep cuts.Now, as she scrolled Netflix in search of “bad television” to distract her racing mind, Ms. Young had a sinking feeling. What if she cut a deal to reduce spending and raise the debt limit, only to see Republicans attempt to force through much deeper cuts when it came time to pass annual appropriations bills this fall?At work the next morning, Ms. Young asked her staff how to stop that from happening. They settled on a plan, which in essence would penalize Republicans’ most cherished spending programs if they failed to follow the contours of the agreement. Then they forced Republicans to include that plan in the legislative text codifying the deal.That approach reflected a broader strategy President Biden’s team followed in the debt limit negotiations, according to interviews with current and former administration officials, some Republicans and other people familiar with the talks.On Saturday, that strategy reached its conclusion as Mr. Biden signed the Fiscal Responsibility Act of 2023 into law, just days before a potential default and following weeks of talks and a revolt from right-wing lawmakers in the House that put an agreement at risk of collapse.In pursuit of an agreement, the Biden team was willing to give Republicans victory after victory on political talking points, which they realized Mr. McCarthy needed to sell the bill to his conference. They let Mr. McCarthy’s team claim in the end that the deal included deep spending cuts, huge clawbacks of unspent federal coronavirus relief money and stringent work requirements for recipients of federal aid.But in the details of the text and the many side deals that accompanied it, the Biden team wanted to win on substance. With one large exception — a $20 billion cut in enforcement funding for the Internal Revenue Service — they believe they did.The way administration officials see it, the full final agreement’s spending cuts are nothing worse than they would have expected in regular appropriations bills passed by a divided Congress. They agreed to structure the cuts so they appeared to save $1.5 trillion over a decade in the eyes of the nonpartisan Congressional Budget Office. But thanks to the side deals — including some accounting tricks — White House officials estimate that the actual cuts could total as little as $136 billion over the two enforceable years of the spending caps that are central to the agreement.Much of the $30 billion in clawed-back Covid-19 money was probably never going to be spent, Biden officials say, including dollars from an aviation manufacturing jobs program that had basically ended.At one point in the talks, administration officials offered to include in the deal more than 100 relief programs from which they were willing to rescind money. The final list spanned 20 pages of a 99-page bill, and Mr. McCarthy championed it on the House floor. But because much of the money was repurposed for other spending, the net savings added up to only about $11 billion over two years. One of the programs had a remaining balance of just $40.Many Democrats remain furious that the deal included new work requirements that could push 750,000 people off food stamps, which the Biden team begrudgingly concluded it had to accept.That measure alone could have tanked Democratic support for the deal in Congress, officials knew. So they sought to counterbalance it with efforts to expand food stamp eligibility for veterans, the homeless and others, which Republicans agreed to do. The budget office concluded that the changes would actually add recipients to the program, on net.Some Democrats and progressive groups have sharply criticized Mr. Biden for negotiating over the debt limit at all, denouncing the spending cuts and work requirements and saying he cemented Republicans’ ability to ransom the borrowing limit whenever a Democrat occupies the White House.Republican negotiators sold the deal as a game-changing blow to Mr. Biden’s spending ambitions. “They absolutely have tire tracks on them in this negotiation,” Representative Garret Graves of Louisiana said before the House vote on Wednesday.Mr. Biden views it differently. As the Senate prepared to pass the agreement on Thursday evening, he huddled with his chief of staff, Jeffrey D. Zients, along with Steve Ricchetti, counselor to the president, and other aides, in Mr. Zients’s office in the West Wing of the White House. Mr. Biden asked them what you might call a scorecard question: What percentage of Democrats in the House had voted for the deal, and what share were expected to in the Senate?When Mr. Ricchetti told him the number of Democrats would be larger, in both chambers, than the share of Republicans supporting the deal, Mr. Biden was pleased. It was validation, in his view, that he had cut a good deal.Mr. Zients referred to that vote share in an interview on Friday. “If you go back a few months ago, no one would have thought this was possible,” he said.It was not an assured outcome. The negotiating teams came to the table with divergent views of the drivers of federal debt in recent years. White House negotiators blamed Republican tax cuts. Republicans blamed Mr. Biden’s economic agenda, including a debt-financed Covid relief bill in 2021 and a bipartisan infrastructure bill later that year.The dispute occasionally grew profane. At one point, after Mr. Biden’s negotiators criticized the 2017 Republican tax cuts, a “very mild-mannered” aide to Mr. McCarthy stood up, shook his finger at the Biden team and hotly responded that their argument was nonsense, using a vulgarity, Mr. Graves recounted.Mr. Biden had insisted for months that he would not negotiate over raising the borrowing limit. But privately, many aides had been planning on talks all along — though they refused to admit those talks were linked to the debt limit. The Biden team reasoned that it would have to negotiate fiscal issues this year anyway, both on appropriations bills and on programs like food stamps that are included in a regularly reauthorized farm bill.Mr. Biden’s economic advisers, including Lael Brainard, the director of the National Economic Council, and Treasury Secretary Janet L. Yellen, were warning of catastrophic damage to the economy if the government could no longer pay its bills on time.The president appeared to score wins before the talks even started. He goaded Republicans into agreeing, in the midst of his State of the Union address, that Social Security and Medicare would be off limits in the talks — thanks to a spontaneous riff that grew out of a passage in his speech that he had worked on extensively in the days beforehand. He proposed a budget filled with tax increases on the rich and corporations that were meant to reduce debt, but he refused to engage Mr. McCarthy in serious talks until Republicans offered a spending plan of their own.In late April, the House passed a bill that included $4.7 trillion in savings from spending cuts, canceling clean-energy tax breaks and clawing back money for Covid relief and the I.R.S. It featured work requirements and measures to speed fossil fuel projects, and it raised the debt limit for one year.Mr. Biden, under fire from business groups and others who feared the standoff could result in the United States running out of money before the debt limit was raised, soon agreed to designate a team of negotiators. The White House team was led by officials including Ms. Young and one of her top aides, Michael Linden, who delayed his departure from the White House to help negotiate along with Louisa Terrell, the legislative affairs director, and Mr. Ricchetti.Mr. McCarthy’s negotiators gave Biden officials the impression that to reach agreement, they needed at least one talking point from every major aspect of the House Republican debt limit bill.The talks took a few surprising turns. Multiple White House officials say the Republican team briefly entertained relatively modest proposals to raise tax revenue, including closing loopholes that benefit some real-estate owners and people who trade cryptocurrency. Those discussions stalled quickly.Democrats agreed to fast-track a natural gas pipeline, in what officials concede was making good on a promise to Senator Joe Manchin III, Democrat of West Virginia, for backing Mr. Biden’s signature climate law last year.The spending caps ended up roughly where many Biden aides had predicted they would in private discussions months ago. But few White House officials believed they would have to give up $20 billion of the $80 billion that Democrats approved last year to help the I.R.S. crack down on tax cheats. Mr. Biden hammered out the amount in a final call with Mr. McCarthy.Ms. Young said that cut was painful. “And not just for me,” she added. “It’s something we talked to the president about many times. He cares deeply about this.”On Thursday evening in Mr. Zients’s office, the president and his team were focused on upsides. They had beaten back Republican attempts to cancel the climate law, to add new work requirements on Medicaid recipients and to impose binding spending caps for a decade. Mr. Biden was particularly pleased to spare key veterans’ programs from cuts.On Friday morning, Mr. Zients gathered core officials in his office, as he had every day, seven days a week, for several weeks running. Ms. Brainard and the economic team were relieved to have cleared the threat of default not just for this year, but through the next presidential election. Aides worked on honing Mr. Biden’s planned remarks in an Oval Office address on Friday evening.The speech started at 7:01 p.m., unusually promptly for Mr. Biden. By then, his staff was already celebrating. An hour earlier, happy hour had begun in Mr. Zients’s office.Catie Edmondson More