Republicans and Democrats in the Senate reached an agreement late Thursday but are still working to tee up a vote.