WASHINGTON — As the White House and Congress careen toward another fiscal showdown, the nonpartisan Congressional Budget Office warned on Tuesday that President Obama and lawmakers have been cutting the wrong kind of federal spending as they try to avoid the unsustainable buildup of debt that is projected in the coming decades.

Annual federal deficits will continue to fall in the short term, the budget office reported in its yearly long-term outlook, because of the recent spending cuts in military and domestic programs and rising tax collections in a recovering economy. The report projected the deficit in 2015 to be equal to 2.1 percent of the economy’s output, or just one-fifth of the peak shortfall at the height of the recession in 2009.

But starting in 2016, deficits are projected to rise again as more baby boomers begin drawing from Medicare, Medicaid and Social Security — the fast-growing entitlement programs, which Democrats and Republicans cannot agree on how to rein in.

The accumulating federal debt, which averaged 38 percent of the gross domestic product for the 40 years before the 2008 financial crisis, would rise from 73 percent of the G.D.P. now — above what most economists consider an optimum level — to at least 100 percent in 2038.