Congressional leaders in both parties have reached a $1.6 trillion budget agreement that would avert a government shutdown later this month.