Congressional negotiators reached agreement Thursday on a compromise spending bill to avert a weekend federal shutdown. They also worked toward a deal renewing the payroll tax cut and unemployment benefits for another year but prepared a shorter version as a fallback in case talks fell short.