WASHINGTON — The worst of the federal cuts to a major infant nutrition program would be reversed. Embassy security and construction could be spared in the wake of the consulate attack in Benghazi, Libya.

And child-care subsidies, once seen as critical to the success of welfare reform, would take a haircut, not the hammer blow that President Obama once loudly warned was coming.

With the expected Senate passage this week of broad legislation to finance the federal government through Sept. 30, a lucky few programs will be spared the brunt of the automatic spending cuts now coursing through the federal government.

Also, managers in some departments, especially the Defense Department, will gain more flexibility to carry out cuts.

The overall size of the cuts will remain the same, as will the short-term impact on the economy, because total spending outside of entitlement programs like Medicare and Social Security must remain beneath a hard cap of $984 billion.

One program’s gain in the spending bill will mean another’s loss, caution the Democratic and Republican authors of the bill, which the House seems poised to pass as well.

The bill is a mixed blessing for Obama and others, especially Democrats, who hope Congress will eventually reverse the recent cuts.

The changes make the cuts less arbitrary and damaging in the eyes of many independent experts.

They reduce the effect on programs that touch national security, child health and welfare, but they inhibit long-term economic growth, through science funding and other areas.

But the new continuing resolution might have a political impact beyond the numbers: It could reduce some of the most obvious disruptions in federal services, potentially easing the pressure that Obama had hoped would soften Republican opposition to a replacement that combined spending cuts with tax increases.

“The combination of the various appropriations bills, funding transfers and reprogramming authority takes the doom and gloom out of sequestration,” said Chris Krueger, a senior policy analyst at Guggenheim Securities’ Washington Research Group. “You’ve still got $85 billion coming out. You’re still going to get the hit to the economy.”

That means lower employment levels and slower growth this year, public and private forecasters have said.

Rather than rearranging the cuts across the budget, Ben Bernanke, the chairman of the Federal Reserve, has recommended holding them back until the still-sluggish recovery takes stronger hold.

“Besides having adverse effects on jobs and incomes, a slower recovery would lead to less actual deficit reduction in the short run,” Bernanke said last month.

Republican senators, some of whom have cheered on the “sequestration” cuts, spent Tuesday jostling for last-minute votes on their priorities.

The new package of cuts cleared its biggest procedural hurdle Monday night, with a 63-35 vote to end debate, but failed to win approval Tuesday.

It still appears likely to pass the Senate this week, given Monday’s vote, and to clear the House shortly after its final Senate vote. The legislation would replace the current stopgap spending law with a more detailed plan.

If Congress maintained current levels of spending through September, $500 million would have gone to a space-shuttle program that no longer exists, and the Pentagon would get too much money for wars winding down and not enough for retraining and rebuilding a force depleted by more than a decade of fighting.

With the changes, the Agriculture Department’s nutrition program for women, infants and children (WIC) would receive an additional $250 million under the Senate bill, enough to serve 300,000 more people. That sum would help offset a $333 million sequester cut that the program must absorb over the next six months.

The State Department’s embassy security, construction and maintenance account had been girding for a $79 million hit. Instead, an additional $90 million for the rest of 2013 will leave the account slightly ahead of where it was last year.

The federal child care and development block grant, slated for a $115 million cut, would lose $65 million instead. The Energy Department’s nuclear-weapons programs, promised large budget increases to win Republican votes for a 2010 nuclear arms accord, will still take a hit under sequestration. But the cut would be $237 million instead of $600 million.

In exchange, other programs would experience larger cuts. Military construction for barracks, schools and hospitals worldwide would lose billions of dollars.

Energy research, already taking a 5 percent cut under the sequester, or more than $150 million, would absorb another $44 million loss.