Monday's agreement on the legislation, which will carry a price tag of almost $1 trillion over a decade, came after lawmakers spent months ironing out differences over food stamps, crop insurance, farm subsidies and other issues contained in earlier House and Senate legislation.