The prosecutor or defense counsel may apply to the court for a hearing to review the defendant‘s competency attainment programming. All parties are entitled to notice before the hearing. The hearing shall be held no later than 30 days after the date of the request, unless extended upon agreement of the prosecutor and defense counsel or by the court for good cause.