The star of DIY Network's Rehab Addict has seemingly brought what she's called a "heart-wrenching" chapter to a close

Nicole Curtis and her ex have signed a custody agreement that should bring their years-long legal batter over their son to an end.

The star of DIY Networks’s Rehab Addict and Shane Maguire, a Minnesota-based businessman, will continue to share joint legal and physical custody of 3-year-old Harper, according to documents filed in a Michigan court on Monday, and first obtained by The Blast.

The agreement follows several years during which the couple could not see eye-to-eye on parenting and brought legal action against one another several times.

Curtis told PEOPLE on Wednesday, “As court records indicate, an agreement was reached. As a parent you do whatever you have to do to keep peace and calm for your child — this was best for our son.”

Maguire’s attorney did not immediately respond to PEOPLE’s request for comment.

The document states that Curtis and Maguire will “share equal responsibility and decision-making authority” for Harper’s wellbeing, including his health care, education and religious training and will confer with one another about “all matters of importance.”

They are agreeing not to do or “say anything in the presence of the child that portrays the other … in a negative or false light, or that will tend to discredit or damage the love that the child and the parents have for each other.”

Credit: Nicole Curtis/Instagram

The document also details that neither parent can alter Harper’s appearance without the other’s permission, something that became an issue after Curtis alleges Maguire gave Harper his first haircut without telling her because he “looked like a girl” in April.

Curtis has also agreed to create a $250,000 trust for their son which her ex can use to purchase a condo within 25 miles of Curtis’ California home, the Blast reports.

The seemingly amicable decision, which the couple reached ahead of an upcoming court date, according to The Blast, ends a three-year legal back and forth for the couple.

Curtis posted a photo of herself, Harper, Maguire, and other friends hanging out together on October 1. “They say a picture is worth a thousand words, so I’ll let this one speak for itself and say how lucky I am to be surrounded with friends that do nothing but support me through life’s most difficult times,” she captioned the photo.

The home renovation TV star, who has appeared on HGTV and DIY, split from Maguire after an on-off again romance that ended shortly before she discovered she was pregnant in 2014.

Curtis also has an adult son, Ethan, from a previous relationship.

In her 2016 memoir Better than New, she describes Maguire’s reaction to her pregnancy as unexpected and writes that she planned to move forward raising the child on her own. (Maguire’s lawyer told PEOPLE in 2016 that his client “couldn’t have been happier to find out he was the father to his son.”)

Maguire filed for paternity and joint custody in December 2015. He was awarded both, according to The Detroit News.

F:PHOTOReady RoomActionsInsert Request47825#Nicole CurtisUnknown1.jpg
Credit: From left: Nicole Curtis, her son Harper and Shane

Curtis tried and failed to modify the agreement so that Maguire could not have overnight custody of Harper until he’s 2 years old. Curtis said at the time that Harper was being exclusively breastfed and claimed she was physically unable to follow a court instruction to pump enough breast milk in advance for the baby’s time away from her. In response, Maguire alleged she was using breastfeeding as an excuse to keep him away from Harper, something Curtis denies.

“I’ve always been a proponent of co-parenting and children first and it’s just kind of backfiring right now,” she told PEOPLE at the time.

Curtis’s desire to breastfeed her son also led to conflicts between the couple. In one heated exchange, she alleges he told her to “put your boob away” when she went to breastfeed Harper while sitting in a car in his driveway.

She has become an advocate for normalizing breastfeeding, often speaking out on social media. She described this as “the scariest part of my journey,” because of backlash about her decision to continue to breastfeed Harper at 30 months while practicing baby-led weaning. “I’m still crusading, trust me on that,” she tweeted in 2017.

F:PHOTOReady RoomActionsInsert Take47825A1#Melanie Acevedo654481-2 copy.jpg
Credit: Melanie Acevedo

Things seemed to take a positive turn in March, when Curtis and Maguire had dinner together. “Shane has been to L.A. and the new house,” Curtis told PEOPLE. “We went to dinner the other night just the two of us.”

Things quickly dissolved again when Curtis alleges, she was denied time with Harper on Easter, and just a few months later, when Maguire filed for sole custody of Harper, claiming she is “not a fit” mother and was intentionally sabotaging the relationship between the boy and his dad, according to legal documents.

“As much as I would say that it has really not been fun having everything drawn out in public, I think it’s also changed the course of my life,” Curtis told PEOPLE in July. “Because God isn’t putting bad in your life without [a reason]. Sometimes, the storm is there to clear the path for the sunshine.”