Whenever it shall appear to the satisfaction of the appropriate director of the probation department that a person sentenced pursuant to article sixty of the penal law has received a sentence which is invalid as a matter of law, it shall become his duty to notify the district attorney of the county in which such person was convicted. Upon such notification, the district attorney shall immediately investigate the matter and if such sentence of probation is in fact invalid as a matter of law, the district attorney shall immediately move to set aside such sentence pursuant to section 440.40 of this chapter.
N.Y. Crim. Proc. Law § 440.60