Last-minute maneuvering in the Senate allowed the Federal Reserve to sidestep legislation that would have exposed its interest-rate decision-making to congressional auditors.

Pressure from the Obama administration led Senate lawmakers to alter a provision pushed by Sen. Bernie Sanders (I., Vt.) that was gaining momentum despite opposition from the Treasury and the Fed. It would have largely repealed a 32-year-old law that shields Fed monetary policy from congressional auditors.

The...