The International Monetary Fund (IMF) has appealed to Washington to sort out its finances after the US pulled back from the brink of a debt default and hundreds of thousands of federal employees prepared to return to work after a 16-day government shutdown.

As the US president, Barack Obama, warned: "We've got to get out of the habit of governing by crisis," the IMF's managing director, Christine Lagarde, appealed for more stability.

"It will be essential to reduce uncertainty surrounding the conduct of fiscal policy by raising the debt limit in a more durable manner," she said.

"We also continue to encourage the US to approve a budget for 2014 and replace the sequester with gradually phased-in measures that would not harm the recovery, and to adopt a balanced and comprehensive medium-term fiscal plan."

A Senate-drafted peace deal that contained almost no concessions to the conservatives who had driven the country to the precipice of a new financial crisis was passed by the Republican-dominated House of Representatives just hours before a deadline to extend the US debt limit was to pass.

The World Bank too expressed its relief that the global economy had "dodged a potential catastrophe", with its president, Jim Yong Kim, urging policymakers in all countries to "continue to focus on crafting and implementing policies that promote economic growth and boost jobs and opportunity for all".

Stock markets in Japan, China, Hong Kong and South Korea initially reflected relief after the Republicans finally capitulated in their failed attempt to undermine Obama's healthcare reforms. But in Asia and Europe stock markets overall displayed a muted reaction with traders apparently expecting another battle in Washington early in 2014.

The shutdown is estimated to have cost the US $24bn – £1.5bn a day – according to the ratings agency Standard and Poor. China's official Xinhua news agency had accused Washington of jeopardising other countries' dollar assets. China is the US government's largest creditor.

Obama signed the necessary legislation to fend off a default shortly after midnight on Thursday after a Republican split in the House of Representatives. The bill had passed easily with broad bipartisan support in the Senate, where Democratic and Republican leaders forged the agreement. It offers a temporary fix, funding the government until 15 January and raising the debt ceiling until 7 February.

But the president made clear he did not expect another bitter budget fight and shutdown next year.

In brief remarks at the White House shortly before the House vote, Obama said he hoped the deal would "lift the cloud of uncertainty" that had hung over the country in recent weeks.

"Once this agreement arrives on my desk, I will sign it immediately," he said, in a statement delivered at the White House. "Hopefully next time it won't be in the 11th hour. We've got to get out of the habit of governing by crisis."

As he left the lectern after his Wednesday night press briefing, the president was asked by a journalist whether the crisis would happen all over again in a few months. Speaking over his shoulder, Obama replied: "No."

Earlier, the Republican senator Mike Lee had struck a defiant tone, perhaps indicating more trouble ahead: "The media keeps asking: 'Was it worth it?' My answer is, it is always worth it to do the right thing," he said, adding: "This is not over."

However, the political deal on Wednesday was one of the worst of all possible outcomes for Republicans. None of their stated goals were achieved and polls showed that voters overwhelmingly blamed them for the crisis.