Hostess executives and the baker's union, which is currently on strike, have agreed to mediation.

(Reuters) - Hostess Brands Inc, its lenders and the unions representing its striking workers, agreed to start mediation hearings on Tuesday at the urging of a bankruptcy court judge. A hearing on Monday during which the bankrupt maker of Twinkies snack cakes and Wonder Bread was set to ask for permission to liquidate was quickly adjourned until Wednesday after the judge urged the parties to mediate in private.

The good news is that it's possible 18,500 people will not end up losing their jobs, however it's worth pointing out that, coincidentally, or perhaps not-coincidentally, Hostess executives agreed to mediation only after the Department of Justice thwarted their request to pay additional bonuses this afternoon.

(Reuters) - Hostess Brands Inc, the maker of the iconic Twinkies snack cake, will square off in a bankruptcy court on Monday against an agent of the U.S. Justice Department, who says the wind-down plan is too generous to management. The U.S. Trustee, an agent of the U.S. Department of Justice who oversees bankruptcy cases, said in court documents it is opposed to the wind-down plan because Hostess plans improper bonuses to company insiders. The 82-year-old Hostess wants permission to pay senior management a bonus of up to 75 percent of their annual pay so they will stay on and help wind-down the business.

More from Fortune

"The cessation of ... operations is not a simple matter of turning off the lights and shutting the doors," the company wrote in a court filing. "A freefall shutdown and fire sale liquidation" could result in damaged production equipment and the "improper disposal" of waste, the company added. Under the plan, bonuses ranging from $7,400 to $130,500 will be paid to 19 executives. The company argues the bonuses are below market rates for such payments.

After the Department of Justice thwarted the company's plans to pay new bonuses while liquidating the company, both sides agreed to mediation at the urging of U.S Bankruptcy Judge Robert Drain.

Mediation will begin tomorrow.

For more on how the company arrived at this point, see here.

(h/t Rockville Criminal Defense Attorney Kush Arora)