An action under subsection (a)(1) shall not be dismissed or compromised without the approval of the court, and notice of any proposed dismissal or compromise shall be given in such manner as the court directs.