Which budgetary institutions result in efficient provision of public goods? We analyze a model with two parties bargaining over the allocation to a public good each period. Parties place different values on the public good, and these values may change over time. We model budgetary institutions as the rules governing feasible allocations to mandatory and discretionary spending programs. Mandatory spending is enacted by law and remains in effect until changed, and thus induces an endogenous status quo, whereas discretionary spending is a periodic appropriation that is not allocated if no new agreement is reached. We show that discretionary only institutions lead to dynamic inefficiencies and mandatory only institutions can lead to both dynamic and static inefficiencies. By introducing flexibility, either through a combination of mandatory and discretionary programs, or through a state-contingent mandatory program,we obtain static and dynamic efficiency.