Judgment, Supreme Court, New York County (Bruce Allen, J.), rendered May 12, 1993, convicting defendant, after jury trial, of criminal sale of a controlled substance in the third degree, and sentencing him, as a second felony offender, to a term of 41/2 to 9 years imprisonment, affirmed.
Defendant claims that the courtroom was improperly closed for the testimony of the undercover officer, without even a hearing on the prosecution’s motion. The prosecutor had represented to the court that the undercover was still operating in the vicinity of this particular transaction, and that the prospective witness was concerned about jeopardizing his safety and compromising such continuing operations. The prosecutor noted that "if Defense Counsel objects, we’d ask for a [Hinton] hearing.”
Defense counsel objected to closure on two specific grounds. First, he observed that the undercover did not seem to be threatened by having to sit in the crowded hallway outside the courtroom, where many criminal defendants were passing by; in contrast, defendant anticipated having only one spectator in the courtroom—his girlfriend, who was present throughout the proceedings. Second, counsel faulted the prosecution for trying to create a "melodramatic]” effect by closure of the courtroom, implying that the jurors might be swayed by the sudden absence of defendant’s constant companion.
*141With regard to defense counsel’s first point, obviously the police undercover’s role and function were not identified to the passing public as he sat outside the courtroom, awaiting his summons to the witness stand. As to the second, the Trial Judge sought to fashion a reasonable alternative—which was well within its discretionary authority (see, People v Jones, 47 NY2d 409, 414, cert denied 444 US 946)—by closing the courtroom to all but the girlfriend. When counsel acknowledged that defendant’s girlfriend was the only person he would want in the courtroom, the prosecutor conceded the point, and counsel moved on to other matters. Defendant never requested a formal hearing, and was apparently fully satisfied with the ruling at trial. Any insistence on such formality at this point would grant defendant more relief than he ever asked for.
Even the constitutional right to a public trial can be waived where an objection to courtroom closure is not pursued in a timely fashion (People v Brown, 188 AD2d 540, lv denied 81 NY2d 882; People v Marathon, 97 AD2d 650). Having virtually stipulated to the operative facts and acquiesced in the partial relief without further objection, defendant received the only remedy he desired, and waived the right to an evidentiary inquiry on the issue. Concur—Wallach, Kupferman and Nardelli, JJ.