By the end of the day, however, administration officials were scrambling to contain the political fallout. For weeks they had worked to lower expectations for a deal on the politically volatile issue of immigration.