Credit: Steve Granitz/

Guess everybody's winning now.

After months of private negotiations, Charlie Sheen and ex-wife Brooke Mueller have reached a new custody agreement for their twin, two-year-old sons Bob and Max, Us Weekly has confirmed.

Both Sheen, 45, and Mueller, 33, are "satisfied" with the new terms, an insider adds. No further details on the agreement have been disclosed.

But it's a much more civil ending to the former spouses' very public battle over their boys. Back in March, a judge ordered that Bob and Max be removed from Sheen's L.A. home (then also inhabited by his two "goddess" companions Bree Olson and Natalie Kenly) in the midst of his notorious meltdown and Two and a Half Men firing.

A month later, Sheen lost his court bid for sole custody of the boys. Both he and Mueller have battled drug addictions over the years, clocking in rehab stints (at facilities and at home) this past year. An earlier custody agreement had stipulated both parents stay alcohol and drug-free -- with another rule forbidding either Sheen or Mueller from being photographed with the kids while with a romantic partner.

Living apart since Christmas 2009 (when Sheen infamously threatened Mueller with a knife), the couple finalized their divorce in early May. Sheen agreed to pay Mueller (his third ex-wife) $55,000 per month in child support.