Congressional leaders agreed to a budget-busting set of tax cuts late Tuesday as part of a year-end, clear-the-decks deal that marks a major reversal from the last four years’ focus on deficits and streamlining the tax code.

While the total cost of the package had not been publicly estimated by the Congressional Budget Office, it was expected to total in the hundreds of billions of dollars over the next decade — undoing in one swoop many of the deficit gains the GOP had won under then-Speaker John A. Boehner.

Instead, the 233-page document moves away from deficit-cutting and embraces dozens of special tax breaks that presidential candidates in both parties had said they wanted to eliminate.

The deal explicitly exempts itself from budget rules that normally require all new spending or tax cuts to be offset by tax increases or spending cuts elsewhere in the budget.

The bill will be voted on by both the House and Senate later this week, as Congress tried to wrap up business for 2015.

Negotiators who struck the deal said making some tax loopholes permanent will actually make it easier to do an overhaul of the tax code next year because they’ve narrowed the list of breaks that should be protected.

“This bill is an important piece of our plan to replace our broken tax code with a simpler, fairer system that actually works for the American people,” said Ways and Means Chairman Kevin Brady, a Texas Republican who is in charge of the tax code. “By passing this bill now, Congress will have the freedom in the New Year to move forward with comprehensive tax reform that grows our economy.”

He wrote the agreement with Sen. Orrin G. Hatch, Utah Republican and chairman of the Senate Finance Committee, and Sen. Ron Wyden of Oregon, the ranking Democrat on the Finance Committee.

“Millions of working families with children will not find themselves suddenly taxed into poverty. Millions of college students won’t have the rug pulled out from under them when the tuition bill arrives. Charities can confidently plan and expand the good work they do. And small business and enterprises on the forefront of innovation now have the economic certainty they deserve,” Mr. Wyden said.

Tax breaks on everything from racehorses and film productions to NASCAR racetracks to college tuitions and teachers’ out-of-pocket classroom expenses are covered in the massive deal.

Also included is a permanent extension of the research and development tax credit, created by Congress in the early 1980s as a temporary boost to the slumping economy. It’s been extended 16 different times, but the new bill writes it into the tax code for good.

And the agreement unravels one of the key tax increases in Obamacare, in a move budget watchdogs had long warned against, saying it would make the massive health overhaul a bad deal for taxpayers.

That provision is the so-called “Cadillac Tax,” a 2.3 percent excise tax levied on high-value health plans. The tax was expected to particularly strike at the generous plans unions sometimes negotiated for their members in lieu of pay hikes.

Mr. Obama had fought for the tax, saying it was an important incentive to try to control exploding costs in the health care market, but Democrats in Congress, prodded by their union allies, linked arms with the GOP to impose a two-year delay on the Cadillac Tax, which was to go into effect in 2016.