Last Updated Jan. 23 at 6:13 a.m. ET

Three days into a shutdown of the federal government, Congress reached a deal to reopen it and fund the Children's Health Insurance Program (CHIP) for six years.

The Senate agreed 81-18 on Monday afternoon to pass a short-term spending bill to fund the government through Feb. 8 and give Congress more time to work out a deal on immigration. The House and President Trump signed off on it later that day.

CHIP, which expired more than 100 days ago, insures 9 million low-income children and pregnant women who don’t have employer-based insurance but make too much money to qualify for Medicaid. It's jointly funded by the federal government and states, but the feds foot almost 80 percent of the bill.

Congress has continually released unspent funds in the last few months to help states keep CHIP running, but this was the first time there was a significant funding lapse in what has historically been a bipartisan program.

If the deal wasn't finalized, 10 states -- Arizona, Connecticut, Florida, Hawaii, Louisiana, Minnesota, Nevada, New York, Ohio and Washington -- plus Washington, D.C., were expected to run out of CHIP money by the end of the month, according to the Georgetown University Center for Children and Families.

States were already planning on ending coverage for children and pregnant women or freezing enrollment. Connecticut had already froze enrollment between Christmas and New Year's. 

Congress' failure to find a long-term CHIP solution for months was surprising to many, considering the program’s history of bipartisanship and recent analysis from the Congressional Budget Office (CBO) that shows that reauthorizing it for 10 years would actually save the federal government up to $6 billion. The six-year deal, however, isn't long enough to see those $6 billion savings.

Part of the savings are a result of the new tax law, which eliminated the Affordable Care Act's individual mandate that required everyone to have health insurance. Without it, the CBO predicts that less people will now enroll in CHIP.

“Now CHIP is far and away less expensive than lawmakers originally thought,” said Kelly Whitener, associate professor at the Georgetown University Center for Children and Families.

Under the ACA, the federal match that funds CHIP is scheduled to wind down to 93 percent in 2019 and to 70 percent in 2021.

Despite the division in Congress, governors had remained united on this issue. Republican Govs. John Kasich of Ohio and Brian Sandoval of Nevada and Democratic Gov. John Hickenlooper all issued statements in the last few days, urging Congress to come to a long-term agreement.

In the meantime, state health officials were scrambling.

“It’s been very time-consuming keeping up with the what-ifs,” said Linda Nablo, chief deputy director for Virginia's Department of Medical Assistance Services. “If Congress reauthorizes this soon, do we still send out letters to families? Are we withholding information if we don’t? What does it take to stop the computer system from making payments? What about our call centers, we have to train people to answer questions about what’s going on."

Nablo is worried, however, that stalemates on previously bipartisan programs might be the new normal. 

“If the same dysfunction is applied to other social service programs, that’s no way to run the government. It’s just way too much worry and confusion and resources that shouldn’t have to be there,” she said.

Health officials say the uncertainty led families to either overutilize services or believe that they’ve already lost benefits.

“The better outcome is for families to just know it’s there," said Whitener. "The stress is just so unnecessary and just feeds into distrust of the government."