Although a section 388 petition was not the most appropriate means to modify a disposition order, it was within the court’s discretion to grant the petition and remove the minors. Dependency proceedings were initiated in 2014 involving the minors, who were placed with their parents. Family maintenance reviews continuously took place, and there were various allegations of mistreatment of the minors. In 2018, the Department filed a modification petition pursuant to Welfare and Institutions Code section 388, requesting that the minors be detained because of the risk of harm in the home. The juvenile court granted the petition and removed the minors. Both parents filed writ petitions, contending that the removal order was procedurally defective because it went beyond the scope of the modification request before the court. The appellate court disagreed and found no procedural defect in the juvenile court’s removal order. Even though the petition requested the minors be “detained” rather than “removed,” the petition did state that the minors were at substantial risk of harm, and counsel for the minors supported the request. Under those circumstances, the challenged section 388 petition adequately encompassed the potential removal of the minors. Even if the removal did exceed the scope of the relief sought, the juvenile court has the inherent authority to modify or set aside its order sua sponte as circumstances warrant and there has been notice to the parties. Here, petitioners had notice and opportunity to challenge the removal at the section 388 hearing, including the right to present evidence and confront witnesses, and they did so.