
    The People of the State of New York, Respondent, v Hubert Delancey, Appellant.
   Appeal by the defendant from a judgment of the Supreme Court, Kings County (De Lury, J.), rendered June 5, 1989, convicting him of criminal sale of a controlled substance in the third degree, criminal possession of a controlled substance in the third degree, and criminal possession of a controlled substance in the seventh degree (two counts), upon a jury verdict, and imposing sentence.

Ordered that the judgment is affirmed.

The defendant was arrested for selling two vials of crack-cocaine to an undercover police officer in a "buy and bust” drug operation. On appeal, the defendant contends that the court committed several errors which deprived him of his due process right to a fair trial. He complains that his right to be present at all material stages of the proceedings against him was violated when the court held a hearing, in his absence, to determine whether the courtroom should be closed during an undercover police officer’s testimony. The defendant failed to preserve this error for appellate review, by either stating a specific or timely objection to the closing of the courtroom or by moving for a mistrial (see, CPL 470.05 [2]; People v Miller, 257 NY 54, 60-61; People v Baez, 162 AD2d 602, lv denied 76 NY2d 852).

Moreover, the closure hearing did not constitute a material stage of the trial during which the defendant’s presence was required in order to safeguard his constitutional and statutory rights (see, People v Mullen, 44 NY2d 1, 4-5, citing Snyder v Massachusetts, 291 US 97, 108). It is settled that a defendant’s presence may be dispensed with during purely ministerial proceedings, wholly unrelated to the substantive legal or factual issues of the trial (see, People v Velasco, 77 NY2d 469; People v Harris, 76 NY2d 810, 812; People v Rodriguez, 76 NY2d 918; People v Ferguson, 67 NY2d 383), or in situations where his presence would be "useless, or the benefit but a shadow” (Snyder v Massachusetts, supra, at 106-107). The purpose of the proceeding at issue was merely to take general testimony from the undercover police officer, in order to make the procedural determination regarding whether the courtroom should be open or closed when he subsequently testified before the jury. Both counsel were present at the hearing and no testimony relevant to the specific transactions at issue was elicited. Consequently, the defendant’s due process rights were not implicated and his absence from the hearing did not prejudice him in any measurable way (People v Davis, 173 AD2d 634).

The defendant also claims that he was denied a fair trial by the court’s reversal of its Sandoval ruling. Initially, the court precluded all interrogation concerning the defendant’s prior convictions. Relying on this ruling, the defendant decided to testify in his own defense. The court then reversed itself and permitted limited cross-examination on these offenses, on the basis that the defendant had opened the door by testifying as to his good character. The record reveals that the defendant did, in fact, put his character in issue, and the court did not err, then, by allowing the limited cross-examination (see, CPL 60.40 [2]; People v Morgan, 171 AD2d 672; People v Rios, 166 AD2d 616; People v McCullough, 141 AD2d 856, 858).

Finally, the defendant’s contention that he was prejudiced by the court’s refusal to give an agency instruction also lacks merit. There was no reasonable view of the evidence that the defendant acted as a mere instrumentality (or extension) of the undercover-buyer, rather than as the active "seller” of two vials of crack-cocaine. Hence, an agency instruction was not warranted (see, People v Argibay, 45 NY2d 45, cert denied sub nom. Hahn-DiGuiseppe v New York, 439 US 930; People v Lam Lek Chong, 45 NY2d 64, cert denied 439 US 935; People v Roche, 45 NY2d 78, cert denied 439 US 958; People v Beyda, 170 AD2d 612; People v White, 149 AD2d 548). Brown, J. P., Sullivan, Lawrence and Ritter, JJ., concur.  