For Charlie Sheen in court today, defeat was an option.
The actor left Los Angeles family court late this morning after failing to win full custody of his twin sons, Bob and Max. He and his estranged wife, Brooke Mueller, showed up for today's emergency hearing shortly after 8 a.m. PT.
ABC News confirmed that no change was made in their custody agreement, which means that Mueller maintains primary custody of the boys.
As Mueller left the closed-door hearing she said, "I'm not commenting" and was greeted by her family. She looked happy, smiling as she hugged her mother and father. Sheen, meanwhile, walked out of the courthouse quietly, holding hands with his girlfriend Natalie Kenly, surrounded by a somber-looking entourage.
Sheen and Mueller finalized their divorce months ago, but it does not become official until May 2. The renewed custody battle -- the couple reached a custody agreement last month -- came amid reports that Mueller has returned to rehab. According to TMZ.com, she recently refused a drug test that she was required to take as part of her custody agreement with Sheen.
According to the court, the next hearing is scheduled for June 9.
Sheen, who is traveling the country with his "Violent Torpedo of Truth" tour and is due in Washington, D.C. tonight, wanted custody of the twins and wanted to cut off all of Mueller's child support, which amounts to $55,000 a month.
Denise Richards, Sheen's ex-wife, reportedly stepped in to the drama. According to TMZ, she contacted Sheen and offered to help take care of Bob and Max until the custody dispute is resolved. Sheen said he'd "keep her posted" on the situation.
Sheen and Mueller both have a history of drug abuse. In papers filed in court before their March custody agreement was reached, Mueller said she was struggling with her sobriety and attending a day program as well as living with a sober companion. She said her mother would assist her in caring for the children, according to the documents.
The documents also said that for a time in January before custody became an issue, Mueller and the twin boys lived with Sheen and his two girlfriends, graphic designer Natalie Kenly and porn star Rachel Oberlin.
Mueller, Sheen and his two girlfriends even went on vacation to the Bahamas together but Mueller alleged that Sheen was drinking and his behavior turned violent. She said that Sheen punched her, threatened to stab her with a pen knife and spit on her feet, according to the documents.
Mueller said Sheen also told her that he "hated his ex-wife, Denise Richards, violently and he was going to have her hair shaved off," according to the court records.
Charlie Sheen vs. Brooke Mueller: Who's the Better Parent?
Sheen claims he's a fine father but refused to elaborate on his parenting skills in an interview with ABC News' "20/20" that aired in March. While Mueller does not seem to have his manic approach to life, she shares his problem of substance abuse. Given that, what's best for the children?
In an interview conducted last month before the current dust-up, attorney and child activist Gloria Allred, who represented Sheen's former girlfriend Brittany Ashland in 1997 after he attacked her, said Mueller had the upper hand.
"The drug and alcohol issues with both of them are relevant in terms of what's in the best interests of the children," she said, "but the reason that she sought the (protective) order really appears to be the threats of violence."
In documents filed in Los Angeles Superior Court in March before the custody matter was temporarily solved, Mueller called Sheen insane, claimed that he threatened to stab her in the eye with a pen knife, and said "I will cut your head off, put it in a box and send it to your mom" if she tried to take back their sons.
Allred said that with both parents' history of alcohol and drug abuse and Sheen's past displays of violent behavior (he was arrested for allegedly brandishing a knife at Mueller in 2009 and was convicted of battery with serious injury in the Ashland case), there are no easy decisions.
During his interview with ABC News, Sheen said none of this mess will affect his kids' opinion of him in the slightest.
"They'll wake up one day and realize how cool Dad is," he told "20/20." "And, you know, signs all the checks on the front, not the back. And you know, we need him and we need his wisdom and his bitchin'-ness."
ABC News' Sabina Ghebremedhin contributed to this report.