Charlie Sheen, Brooke Mueller End Ugly Custody Feud (video) 1Charlie Sheen and Brooke Mueller have finally put their young twins, Bob and Max ahead of their own self-indulgence and reached a custody agreement that puts an end to an ugly feud between the two.

LA judge Hank Goldberg accepted the new joint custody agreement, although both parents have yet to sign it, according to gossip site TMZ, to keep the document confidential.

The children will reside primarily with Mueller, 33, who has been in rehab for substance abuse.

Her parents have been watching the kids during the dispute, which began after Sheen demanded sole custody of the twins.

She has a new reality show on the Oxygen network that will document her battle to stay sober. So far, it’s been another ugly fight for her.

She appeared on Paris Hilton’s new show, “The World According to Paris Hilton,” and the footage focuses on her relapsing.

“Brooke’s battle with her addiction is going play out. Brooke did have a relapse while filming,” a source told radaronline.

Mueller is still enrolled in outpatient rehab. She attends both group therapy and individual counseling daily, the Web site said.

“Brooke lives at home in Los Feliz with the boys. She spends her evenings at home with them,” the friend said.

“Bob and Max are in very good hands during the day with Brooke’s mom or her aunt or uncle.

“There is a nanny that also helps out. It’s one day at a time for Brooke, she has battled this addiction for a very, very long time.”

Mueller and Sheen’s divorce became final May 2, about three years after their marriage in 2008.

Sheen, of course, has had his own substance abuse issues to deal with after several bouts of alcohol and cocaine binging with prostitutes.

Two highly publicized incidents involving the police ultimately caused him to lose his job on the hit-show “Two and a Half Men.”