The deal had cleared the Senate by a 74-24 vote shortly after funding had expired for the agencies at midnight.