[Read the bill language here.]

“We have the clearest path forward that we have had in years,” said Holly Harris, the executive director of the Justice Action Network, a bipartisan coalition arguing for an overhaul. “This would be the first time that these members have voted on a piece of legislation that turns away from the lock-’em-up-and-throw-away-the-keys policies of the 1990s. That is groundbreaking.”

Lawmakers and outside advocates involved in the push expect Mr. Trump to render his judgment on the package as soon as this week. Jared Kushner, the president’s son-in-law and the leading voice within the White House for the changes, is likely to brief Mr. Trump on the bill during a broader discussion of legislative priorities with top policy officials on Tuesday, according to one senior administration official, who was granted anonymity to discuss the plans. And at least two influential Republican senators were lobbying the president in its favor.

Senator Mitch McConnell of Kentucky, the majority leader, has told the senators he will bring the package up for a vote if they can show they had the support of at least 60 senators. Speaker Paul D. Ryan of Wisconsin, a vocal advocate of such changes, committed to putting the compromise on the House floor in a lame-duck session that begins on Tuesday if Mr. Trump endorses it and it can clear the Senate.

“Speaker Ryan has long advocated for criminal justice reform,” said AshLee Strong, a spokeswoman for Mr. Ryan. “The House passed legislation earlier this year, and we are hopeful the Senate will act so we can get a bill to the president’s desk.”

The support of the famously mercurial Mr. Trump is by no means guaranteed. But if they can secure an endorsement, senators say they can move quickly on the kind of bipartisan achievement that has eluded Mr. Trump — and bedeviled senators and outside advocates of the overhaul for years.