N.Y. Criminal Procedure Law § 40.30
1. Except as otherwise provided in this section, a person "is prosecuted" for an offense, within the meaning of section 40.20, when he is charged therewith by an accusatory instrument filed in a court of this state or of any jurisdiction within the United States, and when the action either:
2. Despite the occurrence of proceedings specified in subdivision one, a person is not deemed to have been prosecuted for an offense, within the meaning of section 40.20, when: