(CNN) House and Senate negotiators reached bipartisan agreement on a package of spending bills, as well as a continuing resolution to fund the remainder of the government through December 7 and forestall a potential government shutdown battle, aides in both chambers told CNN on Thursday.

The agreement, which the Senate is expected to adopt next week and the House the week after, will prevent a shutdown if President Donald Trump chooses to sign the bills. House and Senate aides say they have been told by White House officials he will sign, avoiding a shutdown in the weeks before the election.

By law, Congress must pass a series of 12 appropriations bills to fund the government before October 1 of each year. That deadline is frequently missed, resulting in shorter-team spending bills, known as continuing resolutions or CRs, over time to avoid government shutdowns until Congress gets it all done.

For 2017, lawmakers passed multiple continuing resolutions until they finally produced a massive spending bill -- known as an omnibus -- in March that packages all of the required spending bills together. Trump, frustrated at the process and $1.3 trillion price tag of the omnibus, vowed to "never sign another bill like this again."

And both chambers are moving more quickly than they have in the recent past to pass those bills on time, though leaders announced Thursday they will still need the CR to fund part of the government through the first week of December.

Read More