It looks like we can breathe a sigh of relief. Last night, Senate leaders struck a deal that is likely to avert a government shutdown. But some in the chamber aren’t so impressed. As one fed-up senator told me last week, the United States has a lot of problems and yet success in today’s Congress constitutes simply keeping the lights on.

This week’s shutdown threat was perhaps the most absurd yet. In most budget battles, the two parties are separated by many billions of dollars. Earlier this year, for instance, the compromise budget that averted a shutdown cut $78.5 billion from the president’s budget request. In this debate, however, the parties were separated by a mere $1.6 billion. The fact is that the preparations for — and certainly the reality of — a shutdown probably would have dwarfed the difference between the two bills.

And even if we escaped catastrophe this time, the new funding agreement will last only until Nov. 18, at which point Congress must decide how to fund the government through 2012. You can bet that debate is likely to lead to a near-shutdown — if not an actual one — too. That will be the fourth shutdown fight of 2011, if you include the debt-ceiling debacle.

These close misses are not, in fact, the same thing as never teetering on the ledge in the first place. Rather, the continued brinkmanship in Washington, where Congress ping-pongs from almost shutting down to almost defaulting on the debt every few months, might be doing the economy much more harm than we realize.

To understand what Congress is risking every time it nears a shutdown, consider what past ones have cost. In 1996, the Office of Management and Budget tallied the two major shutdowns of the decade at about $1.4 billion. Adjusting for inflation would bring that total to more than $2 billion in today’s dollars.

But as an analysis by Roy Meyers, a political scientist at the University of Maryland, found, that estimate left out a lot. It didn’t account for the lost value of work that wasn’t done or the $300 million the federal parks would have taken in or the reduced pace of IRS audits. And then there are the less visible consequences. Meyers suggests that contractors might start charging the government a premium after shutdowns to compensate for the uncertainty of their payments. And a large body of work shows that unstable budget processes at the state level raise borrowing costs. Add those together and a real, sustained shutdown would cost much more than the $1.6 billion that separated this week’s two bills.

Even getting near a shutdown costs money. The government must prepare, and that means a lot of hours spent on nothing useful.

“You have to pull people off whatever they’re doing to inform employees about what they can do and when they can come in,” said Stan Collender, a budget expert at Qorvis communications. “You have to prepare to change the Web sites with new information about what to do during the shutdowns. You have additional security costs for the buildings because you have to lock them up so no one can get in. You have additional maintenance costs in terms of heating and cooling. And let’s say you’re a supplier who is supposed to deliver parts to the government on October 2. What do you do?”

The irony, Collender added, is that “Republicans who are so big on uncertainty and government efficiency would never think it’s prudent to ask a business to operate the way they’re asking government to operate. Can you imagine a business telling employees, ‘We might shut down and keep an eye out for an e-mail telling you whether to report next week’?”

Which gets to a final cost that none of these analyses are considering: the cumulative toll these bouts of brinkmanship are taking on consumer and business confidence.

During the last government shutdown debate, Gallup’s Economic Confidence Index tumbled 24 points. It rebounded after the deal was reached, but then fell 30 points during the debt-ceiling debate. And Gallup wasn’t alone in that finding.

During the summer’s debt-ceiling debate, the consumer confidence numbers gathered by Reuters and the University of Michigan plummeted. In an effort to figure out what was going on, Goldman Sachs tried to plug the data into a model that looked at the index’s historical relationship to the jobless rate, the change in the rate, real average hourly earnings, the S&P 500-stock index, home prices and consumer lending measures. They found that the economic factors explained “only about half” of the drop. Then they tried the same exercise with data gathered from the periods in 1995 and 1996 when the federal government was shut down. Again, consumer confidence “posted poorer readings than economic data alone would have suggested.”

Any economist will tell you that part of the reason consumers and businesses aren’t spending, and thus the economy isn’t recovering, is that they’re scared. They’re scared that the economy will crater again, that the euro zone will fall apart, that Bank of America will go down, that we’ll dip back into recession. And Washington is scaring them further. At a time when our politicians might be called upon to solve extraordinarily difficult problems, they can’t even be trusted to pay the bills.

Republicans won the 2010 midterm elections in part on a promise to end the uncertainty that government was injecting into the marketplace. In fact, they have introduced a whole new form of uncertainty by latching on to a legislative strategy that seeks leverage by risking crisis. The effects are plain. Gallup’s annual government survey was released this week, and only 19 percent of Americans said they are satisfied with the way the country is being run. That’s the lowest reading in the poll’s 30-year history. As one fed-up senator told me last week, simply keeping the lights on amounts to success in today’s Congress.