
    Walkins CONTRERAS, Petitioner-Appellant, v. Dale ARTUS, Superintendent, Clinton Correctional Facility, Respondent-Appellee.
    Docket No. 13-1117.
    United States Court of Appeals, Second Circuit.
    Argued: April 7, 2014.
    Decided: Jan. 23, 2015.
    
      Andrew C. Fine, New York, N.Y. (Ste<ven Banks, The Legal Aid Society, Criminal Appeals Bureau, New York, N.Y., on the brief), for Petitioner-Appellant.
    Alyson J. Gill, Assistant Attorney General, New York, N.Y. (Eric T. Schneider-man, Attorney General of the State of New York, Barbara D. Underwood, Solicitor General, Nikki Kowalski, Deputy Solicitor General, New York, N.Y., on the brief), for Respondent-Appellee.
    Before: KEARSE, JACOBS, and LYNCH, Circuit Judges.
   KEARSE, Circuit Judge:

Petitioner Walkins Contreras, a New York State (“State”) prisoner convicted of, inter alia, rape in the first degree, unlawful imprisonment in the first degree, and burglary in the first degree, appeals from a judgment of the United States District Court for the Southern District of New York, Jed S. Rakoff, Judge, dismissing his petition for a writ of habeas corpus pursuant to 28 U.S.C. § 2254. The petition alleged principally that the trial court denied Contreras (1) his due process right to be present during critical stages of his trial when it held a closed hearing in his absence to consider the disclosability and admissibility of a note written by the. complaining witness and found at the crime scene, and (2) his Sixth Amendment right to the effective assistance of counsel when it barred his trial attorney from disclosing to him the note and the substance of the hearing until after the trial ended. The district court, applying the Antiterrorism and Effective Death Penalty Act* of 1996 (“AEDPA”), dismissed the petition on the ground that the New York Court of Appeals’ rejection of these claims was neither contrary to nor an unreasonable application of precedents of the United States Supreme Court. On appeal, Contreras contends principally that the New York Court of Appeals’ decision was an unreasonable application of the Supreme Court’s decisions in (A) Geders v. United States, 425 U.S. 80, 96 S.Ct. 1330, 47 L.Ed.2d 592 (1976) (limitations on mid-trial communications between the accused and his attorney), and Perry v. Leeke, 488 U.S. 272, 109 S.Ct. 594, 102 L.Ed.2d 624 (1989) (same), and (B) Kentucky v. Stincer, 482 U.S. 730, 107 S.Ct. 2658, 96 L.Ed.2d 631 (1987) (the accused’s right to be present at critical stages of trial), United States v. Gagnon, 470 U.S. 522, 105 S.Ct. 1482, 84 L.Ed.2d 486 (1985) (same), and Snyder v. Massachusetts, 291 U.S. 97, 54 S.Ct. 330, 78 L.Ed. 674 (1934) (same). We affirm.

I. BACKGROUND

Contreras’s convictions resulted from his violent conduct on February 10, 2004, against his estranged wife in her apartment, where they previously lived together. Contreras’s apparent motive was his anger that his wife — referred to herein as “Y.A.” — had filed for divorce and begun a romantic relationship with another man. There is no dispute as to what evidence was given and what proceedings were held at Contreras’s state-court trial.

At trial, Y.A. testified that on the morning of February 10, Contreras arrived at her apartment, confronted her as she was about to leave with her 7-year-old son James, and forced them back into the apartment. Contreras brandished a knife, claimed he had a gun, and told Y.A. that he had come to kill her. Once inside, Contreras and Y.A. struggled in the living room, causing her to drop her purse, scattering its contents. One of the items that fell out was a cellular telephone; when Contreras allowed Y.A. to clean up the mess, she was able to conceal the phone and hide it in the bathroom. Contreras ordered James to his bedroom and Y.A. to hers. Contreras followed Y.A. and forced her, at knifepoint, to have sex.

Contreras then left the bedroom but returned in time to interrupt Y.A.’s attempt to use her bedroom phone to call 911. Contreras proceeded to, inter alia, choke Y.A. with a cord, question her about her new boyfriend, question James about the boyfriend, force Y.A. to have sex again, and force her to write farewell letters to her mother and James. Eventually, Y.A. was able to flee to the bathroom with James and lock the door; she used the cell phone to call 911. The police arrived to find Y.A. in the bathroom and Contreras hiding in a closet.

Contreras’s principal strategy at trial was to attack Y.A.’s credibility, arguing that Y.A. had consented to sex and then fabricated accusations against him after she changed her mind. Defense counsel also argued that Contreras was not guilty of burglary because he had a right to be in the marital home.

A. The Note Found in the Apartment

The police collected various items of possible evidence from Y.A.’s apartment, including a notepad containing a note in Y.A.’s handwriting (the “Note”). The trial court would later describe the Note for the record as follows:

The pad seems to have four bullet points on it. The first one says, I want you to open yourself more to me. The second one acknowledge me in bed. When you are sleeping, parenthesis even though you are getting better, end parenthesis. Third one is take me and fuck the shit out of me. And the fourth one is get tested for.

(Trial Transcript (“Tr.”) at 153-54.)

Following proceedings that are the subject of this habeas petition, the Note was excluded from evidence at Contreras’s trial. The nature of the Note was not disclosed to defense counsel until after the trial had begun and was not disclosed to Contreras until well after the trial had ended.

B. The Proceedings With Respect to the Note

On the morning of jury selection, the State applied in open court for a protective order ruling that “some person[al] papers of the complainant” — by which it meant the Note — were inadmissible in evidence and need not be disclosed to the defense. (Tr. 2.) Contreras’s trial attorney, Barry Apfelbaum, asked for an opportunity to see the Note and oppose the State’s motion. (See id. at 3.) The court read the Note and decided to hold an in camera hearing, with a sealed record, to consider the State’s application (the “Admissibility Hearing”). At the commencement of the Admissibility Hearing, which was initially ex parte, the court stated that it would consider whether the Note should be disclosed to the defense either under New York law as a witness’s prior statement relating to the subject matter of the witness’s testimony, see People v. Rosario, 9 N.Y.2d 286, 290, 213 N.Y.S.2d 448, 451, 173 N.E.2d 881 (1961) (“Rosario”), or under the federal Constitution as material evidence favorable to the defendant, see Brady v. Maryland, 373 U.S. 83, 87, 83 S.Ct. 1194, 10 L.Ed.2d 215 (1963). (See Tr. 153.)

The State represented that the Note was “a personal letter that [Y.A.] wrote to her ... boyfriend at the time of the incident.” (Id. at 154.) It argued that because the Note was “very much a private person[al] letter relating to something [sic ] totally different than the defendant” (id. at 155), and because “[t]he defendant has not made any allegations of knowledge” of the Note (id. at 154), “[i]t doesn’t have anything to do "with the instant case” (id. at 155). Thus, the State contended (1) that the Note was inadmissible at trial pursuant to New York’s so-called “rape shield” law, which excludes certain “evidence of [a] victim’s sexual conduct in sex offense cases,” N.Y. Criminal Procedure Law § 60.42 (McKinney 2004) (see Tr. 154), and (2) that the Note should not be disclosed to the defense because its disclosure would both “embarrass the .victim” and permit Contreras to “fabricate further the defense ... [of] consent” (id. at 155).

After hearing this ex parte presentation, the court informed both sides that it would reserve decision on the State’s application until it could hear testimony from Y.A. the next morning, in camera. (See Tr. 157.) Although Apfelbaum objected to the delay, the court stated that it wanted “to corroborate that the People have not been lied to” by Y.A. (Id. at 159.)

On the following day, the court began by questioning Y.A. under oath in a closed hearing attended by the State, but from which Contreras and his counsel were excluded. Y.A. testified that she had written the Note “for [her]self” at least a month before February 10, 2004, and that the Note was about a new romantic partner, not Contreras. (Tr. 187.) She testified that the notepad had been in her purse when, during her February 10 struggle with Contreras, the purse’s contents scattered onto the floor. (See id.) She stated that she did not know whether Contreras had seen the Note. (See id.) ,

The court called Contreras’s attorney into the hearing room before making its ruling and stated that,

[i]n the interest of disclosure and in the interest of moving this trial along, I am going to disclose to Mr. Apfelbaum the contents of the term [sic ] but I am going to place him under the order of court not to disclose that to his client or to any other person without prior order of the court.

(Tr. 188 (emphases added).) The court then ruled that

this was a pad that was kept by [Y.A.] in her pocketbook and related to notes that she apparently makes before writing longer letters or collecting her thoughts with respect to her boyfriend, who is not the defendant.
Because it does not relate to this event and is [in] the nature of those things covered by the rape shield law, I am excluding it.

(Id. at 189-90 (emphasis added).)

Apfelbaum objected to the ruling, arguing first that the Note could be relevant to refute the burglary charge by indicating that Contreras had entered the apartment lawfully, see N.Y. Penal Law § 140.80 (McKinney 2004) (to be guilty of first-degree burglary, the defendant must have, inter alia, “knowingly enter[ed] or remained] unlawfully in a dwelling with intent to commit a crime therein”). (See Tr. 191-92.) Counsel theorized that after Contreras arrived in the apartment to make a peaceful visit, he might have learned something from the Note about Y.A.’s new relationship that set off his temper, leading him to commit the violent acts with which he had been charged (see id. at 191); counsel argued that “the issue is what the effect of reading this[] may have had on the defendant while he was in the apartment” (id. at 198). The court responded, “[assuming he read it”; and when counsel acknowledged that there was no evidence that Contreras had read the Note, the court said, “Well, the answer is you can’t give it to him so he will create the evidence.” (Id.) The court indicated, however, that Contreras could seek reconsideration of the court’s ruling if the defense produced evidence consistent with counsel’s theory: “If in fact it turns out that absent your showing it to him he voluntarily says that among the things that got me totally annoyed was that [I] picked this up and I read it, I picked up something and read it, well, that’s another story.” (Id. at 199.)

Apfelbaum also objected that the nondisclosure order interfered with his duties to his client, especially if he would need to decide whether to have Contreras testify without his having disclosed to Contreras the contents of the Note and thus without knowing what Contreras’s testimony would be. (See Tr. 192-93.) Apfelbaum argued that he should at least be allowed to question Y.A., and the court agreed. (See id. at 200.) Y.A. was recalled to the hearing room and reminded that she was still under oath (see id. ' at 200-01), and she was then questioned by Apfelbaum.

MR. APFELBAUM: ... [W]e have been talking about what looks like a note pad with some notes on it on the top page. Can I, I guess we have already established that this is your writing on the pad?
THE WITNESS: Yes.
THE COURT: She has said she has written it, she has answered she was [sic] written it, she has stated that it was written substantially before the date in question. That it was something that she was jotting down her notes with respect to a new relationship and that it was in her purse at the time of the incident.
And that she believes it fell out of her purse at the time everything fell out of the purse during the incident.
MR. APFELBAUM: So, let me, is that basically true what the Judge just said?
THE WITNESS: Yes.

(Id. at 201-02.)

Apfelbaum proceeded to ask a number of questions about the Note, the answers to which were generally consistent with Y.A.’s earlier testimony. He was also allowed, over the State’s objection, to ask about the events of February 10. Y.A. testified, inter alia, that “[w]hen [Contreras] pushed us back inside the apartment ... my bag fell on the floor” (Tr. 204); that Contreras did not “mention the pad or the contents of the pad” (id. at 204-05); that Contreras had her new boyfriend’s “telephone numbers ... with him in his wallet” and said something to her indicating that he was upset about her new relationship (id. at 205); that at some points during the incident Y.A. and Contreras were in separate rooms (see id.); and that Y.A. never saw Contreras reading the Note (see id. at 205-06). In addition, Y.A. stated that the last item in the Note, “get tested for,” was unfinished and had been intended to say get tested for HIV (see id. at 208). She testified that the Note concerned

a new person that I was, you know, beginning to know when [Contreras] could tell you that he was HIV tested also.
MR. APFELBAUM: So, this was something you intended to communicate to another person?
THE WITNESS: Yes....

(Id.) The court adhered to its rulings that the Note was inadmissible and was not to be disclosed to Contreras.

Contreras was found guilty of most of the charges against him, including one count each of first-degree rape, first-degree burglary, attempted first-degree assault, and endangering the welfare of a child, and two counts of first-degree unlawful imprisonment. He was sentenced to 20 years’ imprisonment.

C. Contreras’s Challenges to His Connie- * tion

After Contreras was sentenced, his appellate counsel received permission from the trial court to discuss the Note and the substance of the Admissibility Hearing with Contreras. Contreras appealed his conviction, challenging the trial court’s rulings relating to the Note. The Appellate Division disagreed with the trial court’s ruling that the Note was inadmissible under New York’s rape shield law but affirmed Contreras’s conviction on the ground that the Note was irrelevant and hence need not have been disclosed to. Contreras. See People v. Contreras, 47 A.D.3d 411, 412, 848 N.Y.S.2d 650, 652 (1st Dep’t 2008) (“Contreras I”). The court found that “[a]ll of [Contreras’s] theories of relevance are based on far-fetched, speculative scenarios with no evidentiary support.” Id.

Contreras was granted leave to appeal to the New York Court of Appeals, which affirmed in an opinion that rejected his arguments under state and federal law. See People V. Contreras, 12 N.Y.3d 268, 272-73, 879 N.Y.S.2d 369, 371-73, 907 N.E.2d 282 (2009) (“Contreras II”). The Court of Appeals stated that

[i]t is important to understand at the outset the purpose of the proceedings about which defendant complains. It was to determine whether the notes were either Rosario material (i.e., prior statements of the complainant relating to the subject of her testimony).or Brady material (i.e., evidence favorable to defendant). Nothing in the record suggests that they were either. There is no reason to doubt that they were exactly what the complainant said they were— notes written at a different time on another subject. There is no evidence that defendant ever saw them, much less that they motivated his conduct.

Id. at 272, 879 N.Y.S.2d at 371 (emphasis added). The Court held that “[i]n light of the notes’ apparent irrelevance to the case, defendant did not have a right to any hearing on the Rosario or Brady issue.” Id. (emphasis in original).

The Court found that the trial court’s choice of procedures, “allowing] defense counsel to know the contents of the document, to argue for the right to use it at trial and to question the complainant about it, so long as defendant himself was not told what the document said,” was “reasonable” in light of the Note’s irrelevance, its “significant tendency to embarrass the complainant,” and its “potentially inflammatory” nature. Id. at 273, 879 N.Y.S.2d at 372. Although acknowledging that “ex parte proceedings are undesirable, and they should be rare,” the Court stated that “where the issue to be decided is whether a document should or should not be disclosed to the defense, the initial consideration of the question must be ex parte, almost by its nature....” Id.

The Contreras II Court concluded that although “[a] defendant is entitled to be personally present at all critical stages of his trial if his presence would contribute to the fairness of the procedure,” “that rule is inapplicable here, where the hearing was not only noncritical, but, as a matter of law, unnecessary.” Id., 879 N.Y.S.2d at 372-73. Further, while stating that “communication between attorney and client should generally be unrestricted,” the Court noted that “there are occasions where restrictions may legitimately be applied,” and it rejected Contreras’s right-to-counsel claim on the ground that “disclosure by lawyer to client of an embarrassing and inflammatory document having nothing to do with the case is not a constitutionally protected communication.” Id., 879 N.Y.S.2d at 373 (emphasis added).

Contreras then brought the present ha-beas corpus proceeding, pursuing his claims of denial of his rights to be present at the Admissibility Hearing and to effective assistance of counsel. A magistrate judge recommended that the habeas petition be denied on the ground that the New York Court of Appeals had not unreasonably applied either the Supreme Court’s rulings in Geders and Perry as to the permissibility of limiting communications between a defendant and his attorney during a criminal trial, or the Supreme Court’s rulings in Stincer and Snyder with respect to a defendant’s right to be present at critical stages of his criminal proceeding. See Contreras v. Artus, No. 09 Civ. 7940, 2012 WL 4044872, at *8-*11 (S.D.N.Y. Sept. 11, 2012) (“Contreras III”). .

The magistrate judge also observed that, “despite the availability of post-conviction remedies under New York Law, see N.Y.Crim. Proc. Law § 440.10, Contreras has never indicated to the state courts that he, in fact, saw the Note on the date of his arrest, much less that it led him to engage in any of the conduct giving rise to his conviction.” Contreras III, 2012 WL 4044872, at *9. The district judge, adopting the magistrate judge’s reasoning in full, dismissed the petition and denied Contreras’s request for a certificate of appealability*

Contreras then moved for a certifícate of appealability from this Court (“COA Motion”),

seeking] permission from this Court to raise both issues that [h]e raised in the District Court: (1) the New York Court of Appeals unreasonably applied United States Supreme Court right-to-counsel precedent by affirming the trial-long ban on communication between defense counsel and petitioner regarding the subject of a potentially relevant and mitigating Note found in the complainant’s apartment after the crimes were allegedly committed there; and (2) petitioner was denied his right to be present, in violation of due process and confrontation, when he was excluded during an in camera examination of the complainant regarding the Note in question, during which the complainant previewed substantive testimony about the incident.

(COA Motion at 2, ¶ 3 (emphasis added).) The motion also argued that “the unreasonableness of the state courts’ factual determination that the Note was irrelevant [was] an independent basis for granting the writ. See 28 U.S.C. § 2254(d)(2).” (COA Motion'at 10.) We granted the certificate of appealability.

II. DISCUSSION

Under AEDPA, a federal court may not grant a state prisoner’s petition for habeas relief

with respect to any claim that was adjudicated on the merits in State court proceedings unless the adjudication of the claim—
(1) resulted in a decision that was contrary to, or involved an unreasonable application of, clearly established Federal law, as determined by the Supreme Court of the United States; or
(2) resulted in a decision that was based on an unreasonable determination of the facts in light of the evidence presented in the State court proceeding.

28 U.S.C. § 2254(d) (emphases added). “This is a ‘difficult to meet[ ]’ ... and highly deferential standard for evaluating state-court rulings, which demands that state-court decisions be given the benefit of the doubt....” Cullen v. Pinholster, — U.S. -, 131 S.Ct. 1388, 1398, 179 L.Ed.2d 557 (2011) (quoting Harrington v. Richter, 562 U.S. 86, 131 S.Ct. 770, 786, 178 L.Ed.2d 624 (2011) (other internal quotation marks omitted)); see, e.g., Felkner v. Jackson, 562 U.S. 594, 131 S.Ct. 1305, 1307, 179 L.Ed.2d 374 (2011) (where, on a Batson challenge, “the trial court credited the prosecutor’s race-neutral explanations, and the California Court of Appeal carefully reviewed the record at some length in upholding the trial court’s findings!, t]he state appellate court’s decision was plainly not unreasonable”); Yarborough v. Alvarado, 541 U.S. 652, 664, 124 S.Ct. 2140, 158 L.Ed.2d 938 (2004) (state court’s determination that a claim lacks merit precludes federal habeas relief so long as “fairmind-ed jurists could disagree” on the correctness of the state court’s decision). In reviewing a district court’s decision on a state prisoner’s habeas petition, we review the district court’s legal rulings de novo, but “we cannot grant habeas relief where a petitioner’s claim pursuant to applicable federal law, or the U.S. Constitution, has been adjudicated on its merits in state court proceeding^ in a manner that is not manifestly contrary to common sense.” Anderson v. Miller, 346 F.3d 315, 324 (2d Cir.2003).

On this appeal, Contreras principally contends that the district court erred in rejecting his arguments that the New York Court of Appeals unreasonably applied Supreme Court precedent as established in Geders, 425 U.S. 80, 96 S.Ct. 1330, and Perry, 488 U.S. 272, 109 S.Ct. 594, with regard to Sixth Amendment constraints on prohibitions against mid-trial communications between an accused and his attorney, and as established in Stincer, 482 U.S. 730, 107 S.Ct. 2658, Gagnon, 470 U.S. 522, 105 S.Ct. 1482, and Snyder, 291 U.S. 97, 54 S.Ct. 330, with regard to an accused’s due process right to be present at critical stages of the proceedings.

Contreras also contends, as “an independent basis for granting the writ,” that “the state courts’ factual determination that the note was irrelevant” was unreasonable. (Contreras brief on appeal at 41; see also id. at 36-37 (the New York “Court of Appeals’ finding of fact that the note was irrelevant ... is not merely unreasonable, but indefensible”); id. at 29, 47 (New York Court of Appeals’ rejections of Contreras’s right-to-counsel and right-to-be-present claims were “based on an unreasonable determination of the facts”).) Given the significant deference owed to state-court decisions under AEDPA, we hold that Contreras has not sustained his burden and that his petition must be denied.

A. The Claimed Unreasonable Determination of the Facts

Preliminarily, we note that the State argues that Contreras’s present contention that he was entitled to have the writ granted on the ground that the state courts’ decisions as to relevance were based on an unreasonable determination of facts, see 28 U.S.C. § 2254(d)(2), is not properly before us because it was not a contention presented to the district court. This argument has considerable merit: Although Contreras cited § 2254(d)(2) to the district court (see Petitioner’s Memorandum of Law in Support of Petition for a Writ of Habeas Corpus at 21) and took exception to the findings of the state courts — for instance by maintaining that “there was no indication either way whether [Contreras] saw the note” (id. at 34) — we do not see that he presented an argument that any state-court decision amounted to an unreasonable determination of the facts relating to the relevance of the Note. Rather, he argued that the New York Court of Appeals misapplied Supreme Court precedent “[e]ven assuming arguendo that the note was not relevant” (id. at 33-34), and he asserted that the State’s “emphasis on relevance is entirely misplaced” (Petitioner’s Reply Memorandum of Law in Support of Petition for a Writ of Habeas Corpus at 4; see also id. at 4-5 (the state court’s “procedural/constitutional errors must be reviewed independently of the ultimate determination of relevancy”)).

“In general, ‘a federal appellate court does not consider an issue not passed upon below.’ ” Baker v. Dorfman, 239 F.3d 415, 420 (2d Cir.2000) (quoting Singleton v. WulFf, 428 U.S. 106, 120, 96 S.Ct. 2868, 49 L.Ed.2d 826 (1976)). However, that rule is not jurisdictional but prudential, and we retain discretion to consider such an issue “(1) where consideration of the issue is necessary to avoid manifest injustice or (2) where the issue is purely legal and there is no need for additional fact-finding.” Baker v. Dorfman, 239 F.3d at 420 (internal quotation marks omitted); see id. at 421 (“ehoos[ing] to reach the merits” of “a pure question of law”). In the present case, although Contreras did not argue to the district court that his habeas petition should be granted on the ground that the state courts’ decisions as to relevance rested on an unreasonable determination of the facts, he did explicitly so argue in his COA Motion to this Court (see COA Motion at 10). As our order simply said “the motion is GRANTED,” Contreras v. Artus, No. 13-1117 (2d Cir. July 15, 2013), Contreras’s unreasonable-determination-of-the-facts argument is technically within the scope of this appeal. In any event, the argument presents us with pure questions of law, which we address.

First, to the extent that Contreras views relevance as a “fact” (Contreras brief on appeal at 36-87 (referring to “the [New York] Court of Appeals’ finding of fact that the note was irrelevant”); see, e.g., id. at 41 (referring to “the state courts’ factual determination that the note was irrelevant”)), his view is analytically flawed. “Evidence is relevant if it has any tendency in reason to prove the existence of any material fact, i.e., it makes determination of the action more probable or less probable than it would be without the evidence.” People v. Giles, 11 N.Y.3d 495, 499, 873 N.Y.S.2d 244, 246, 901 N.E.2d 737 (2008) (internal quotation marks omitted) (emphasis added); see, e.g., Fed.R.Evid. 401 (“Evidence is-relevant if ... it has any tendency to make a fact” that is “of consequence in determining the action” “more or less probable than it would be without the evidence.”). But relevance itself is not a fact:

Relevancy is not an inherent characteristic of any item of evidence but exists only as a relation between an item of evidence and a matter properly provable in the case. Does the item of evidence tend to prove the matter sought to be proved? Whether the relationship exists depends upon principles evolved by experience or science, applied logically to the situation at hand.

Fed.R.Evid. 401 Advisory Committee Note (1972) (emphases added).

Assessment of relevance thus involves an exercise of judgment, “call[ing] for an answer to the question whether an item of evidence, when tested by the processes of legal reasoning, possesses sufficient probative value to justify receiving it in evidence.” Id. A trial court’s determination of whether such evidence is to be excluded on the ground of lack of relevance is therefore reviewed under the abuse-of-discretion standard, rather than the standard of review for factual findings. See, e.g., United States v. Gupta, 747 F.3d 111, 137 (2d Cir.2014) (“The assessment of the relevance of evidence for the purpose of its admission or exclusion is committed to the sound discretion of the district court.”); Contreras I, 47 A.D.3d at 412, 848 N.Y.S.2d at 652 (“the [trial] court properly exercised its discretion in precluding the use of the note on the ground of relevance”).

Second, to the extent that Contreras instead argues that the state courts’ judgment as to relevance- was based on unreasonable findings of historical fact, his arguments ignore experience, logic, principles of testimonial competency, and the trial court record. To begin with, we note that Contreras does not argue that the Note actually had relevance. His application to this Court referred to the Note as “potentially relevant” (COA Motion at 2 (emphasis added)), and being of “potential importance to the defense” (id. at 8 (emphasis in original)). Contreras’s argument that he was not required to make any showing of actual relevance because he was excluded from the Admissibility Hearing and not allowed to be informed of the Note or the substance of the hearing (see Contreras brief on appeal at 40-41) simply disregards the deference to which state court decisions are entitled under AEDPA.

Contreras suggests two bases on which the Note could have been deemed relevant if only he had been allowed to attend the Admissibility Hearing. He argues that the Note could have been relevant “even if [he] had not seen the note” because its contents would have “inereas[ed] the likelihood that the sexual intercourse that day ... was consensual” if the Note “described [Y.A.’s] relationship with petitioner, rather than another man” (Contreras brief on appeal at 34; see id. at 36 (“if the note related to petitioner, rather than a new boyfriend”)); and he argues that, other than Y.A., Contreras was “the only individual ... in a position to shed light on th[at] issue” (id.). But the author of the Note was Y.A. Only she was competent to say what was in her mind when she wrote the Note and to whom she was referring. Contreras has provided no foundation for his assertion that he was in a position to shed light on whether the Note was about him, given the “fundamental general rule of evidence that a witness must confine his testimony to matters within his personal knowledge,” People v. Mingey, 190 N.Y. 61, 64, 82 N.E. 728, 730 (1907); see, e.g., Fed.R.Evid. 602 (“A witness may testify to a matter only if evidence is introduced sufficient to support a finding that the witness has personal knowledge of the matter.”); Rios v. Selsky, 32 A.D.3d 632, 633, 819 N.Y.S.2d 622, 623 (3d Dep’t 2006) (affirming denial of “request to call certain witnesses since those witnesses had no personal knowledge of the incident” and “[t]heir testimony, therefore, would have been irrelevant”).

Contreras also suggests, as to the Note’s potential relevance, that he could have testified that the Note, “with its lurid description of a sexual relationship, ... triggered [his] anger, increasing the possibility that the motive for the sexual assault arose after a lawful entry — making petitioner not guilty of burglary” — “had petitioner been • advised of the note’s contents.” (Contreras brief on appeal at 33-34 (emphasis added).) But this suggestion has no basis in logic. To provide a foundation for such testimony by Contreras as to his motivation, he would have had to know of the Note prior to the assaults, not learn of its contents for the first time at trial. And it defies logic and experience to speculate that his attorney would not have asked him at the outset “What happened,” or that Contreras, if he knew of and was motivated by the Note, would not have so informed his attorney.

If Contreras knew of the Note prior to his violent conduct and became so inflamed by its contents that he was motivated to commit assault and rape, he was free to so testify even if he had no knowledge of the substance of the Admissibility Hearing. Further, the ban on counsel’s making Note-related disclosures to Contreras was plainly subject to reconsideration; the order itself barred a disclosure “without pri- or order of the court” (Tr. 188), and the trial court at the hearing clearly indicated to Contreras’s attorney that if, without disclosure by counsel of the Note or the substance of the hearing, Contreras informed his attorney that he knew of the Note, Contreras could seek reconsideration of the court’s nondisclosure order and exclusion of the Note from evidence (see id. at 199). Contreras apparently did not so inform his trial counsel, for no such motion for reconsideration was made. And indeed, as the district court here noted, Contreras has never contended that he saw the Note bn February 10, even in state-court posttrial proceedings that were available after his appellate counsel revealed the contents of the Note to him.

Given this record, we cannot conclude that the New York Court of Appeals’ affir-mance of the exclusion of the Note for lack of relevance was based on an unreasonable determination of the facts. The Court found that “[t]here is no reason to doubt that the [notes] were exactly what the complainant said they were — notes written at a different time on another subject,” and that “[t]here [wa]s no evidence that defendant ever saw them, much less that they motivated his conduct.” Contreras II, 12 N.Y.3d at 272, 879 N.Y.S.2d at 371. Although Contreras argues that the state courts and the district court could not properly reach these conclusions because he was excluded from the Admissibility Hearing, he has provided no basis for impeaching the state courts’ factual findings. His contention that the state courts’ determinations as to relevance were based on unreasonable factual findings is meritless.

B. AEDPA Standards on Application of Supreme Court Precedents

The AEDPA requirement that a habeas petitioner show that the state court has contravened or unreasonably applied “clearly established Federal law, as determined by the Supreme Court of the United States,” 28 U.S.C. § 2254(d)(1), means that the petitioner must show that the state decisions were contrary to or an unreasonable application of Supreme Court “holdings, as opposed to ... dicta.” Williams v. Taylor, 529 U.S. 362, 412, 120 S.Ct. 1495, 146 L.Ed.2d 389 (2000). To meet this standard, “a state prisoner must show that the state court’s ruling on the claim being presented in federal court was so lacking in justification that there was an error well understood and comprehended in existing law beyond any possibility for fairminded disagreement.” Harrington v. Richter, 131 S.Ct. at 786-87.

In determining whether a state court’s application of Supreme Court precedent was unreasonable, a habeas court must be guided by the level of specificity of the relevant precedent’s holding, because “the range of reasonable judgment can depend in part on the nature of the relevant rule.” Yarborough v. Alvarado, 541 U.S. át 664, 124 S.Ct. 2140.

If a legal rule is specific, the range may be narrow. Applications of the rule may be plainly correct or incorrect. Other rules are more general, and their meaning must emerge in application over the course of time. Applying a general standard to a specific case can demand a substantial element of judgment. As a result, evaluating whether a rule application was unreasonable requires considering the rule’s specificity.

Id. “The more general the rule, the more leeway courts have in reaching outcomes in case-by-case determinations.” Id.

In light of these principles, we conclude that Contreras has not met his burden.

1. Communications Between Defendant and Counsel

The Sixth Amendment right of an accused to effective assistance of counsel includes broad, but not unlimited, protection for consultation between the accused and his attorney. In Geders, the Supreme Court considered an order, issued at the end of a trial day when the defendant was in the process of testifying, that prohibited the defendant from having any communications with his attorney during the overnight recess. See 425 U.S. at 81, 96 S.Ct. 1330. The Supreme Court held that this order, given its length and breadth, imper-missibly interfered with the defendant’s right to effective assistance of counsel. Stressing the normal occurrence of consultations between criminal defendants and their attorneys during overnight recesses to exchange information and adjust trial strategies, see id. at 88, 96 S.Ct. 1330, the Court held that the

conflict ... between the defendant’s right to consult with his attorney during a long overnight recess in the trial, and the prosecutor’s desire to cross-examine the defendant without the intervention of counsel, with the risk of improper “coaching,” ... must, under the Sixth Amendment, be resolved in favor of the right to the assistance and guidance of counsel,

id. at 91, 96 S.Ct. 1330. The Geders Court’s holding was expressly limited to the facts of that case:

The challenged order prevented petitioner from consulting his attorney during a 17-hour overnight recess, when an accused would normally confer with counsel. We need not reach, and we do not deal with, limitations imposed in other circumstances. We hold that an order preventing petitioner from consulting his counsel “about anything ” during a 17-hour overnight recess between his direct- and cross-examination impinged upon his right to the assistance of counsel guaranteed by the Sixth Amendment.

Id. (emphases added).

In Perry, the Court considered an order barring any communication between a testifying defendant and his attorney during a 15-minute recess; the Court ruled that that order did not violate the defendant’s right to effective assistance of counsel. The Court explained that in such a short recess it was “a virtual certainty that any conversation between the witness and the lawyer would relate to the ongoing testimony,” 488 U.S. at 283-84, 109 S.Ct. 594, and indeed that “it is appropriate to presume that nothing but the testimony will be discussed,” id. at 284, 109 S.Ct. 594; but a “defendant [does not] ha[ve] a constitutional right to discuss [his] testimony while it is in process,” id.

Thus, although the Court acknowledged that “the line between the facts of Geders and the facts of [Perry ] is a thin one,” it found that line to have “constitutional dimension.” Perry, 488 U.S. at 280, 109 S.Ct. 594. That line was between the Ged-ers ban for an interval that was so long that the covered period was one in which the defendant and his attorney would normally discuss matters other than the defendant’s testimony, and the Perry ban for an interval that was so short that it was a virtual certainty that any discussion would concern only the defendant’s testimony.

Focusing on the difference between the lengths of the bans in Geders and Perry, Contreras argues principally that the New York Court of Appeals’ rejection of his Sixth Amendment challenge was contrary to, or unreasonably applied, Geders and Perry because the trial court’s ban on his attorney’s informing him of the Note and the substance of the Admissibility Hearing was longer than the communications ban found unconstitutional in Ged-ers, spanning the entire duration of Contreras’s trial. Given the substantial differences between Contreras’s case and the two Supreme Court cases, we disagree.

First, the New York Court of Appeals’ rejection of Contreras’s Sixth Amendment challenge cannot be said to be contrary to the holdings of Geders and Perry. The communication bans at issue in each case have two major aspects: substantive scope and duration. As to substance, the orders in Geders and Perry prohibited, for then-respective covered periods, all communications between the defendant and his attorney. See, e.g., Geders, 425 U.S. at 91, 96 S.Ct. 1330 (communications “ ‘about anything’ ”). In contrast, the order at issue here was not a prohibition against communications on all topics but instead was narrow in scope, barring Contreras’s attorney only from disclosing to Contreras the existence and contents of the Note and the substance of the Admissibility Hearing on the Note. The Supreme Court in Geders and Perry did not address a communications ban that had a narrow substantive scope. Cf. Morgan v. Bennett, 204 F.3d 360, 368 (2d Cir.2000) (trial court’s prohibition against counsel’s informing the defendant that the complainant, despite her pri- or reluctance following threats from the defendant, had decided to testify against him the next day was “not an unreasonable application of the principle established in Geders and Perry ”), cert. denied, 531 U.S. 819, 121 S.Ct. 59, 148 L.Ed.2d 26 (2000). In Perry, the Court observed that a trial judge, in order to preserve “the truth-seeking” efficacy of cross-examination of a witness whose testimony is interrupted by a short recess, 488 U.S. at 282, 109 S.Ct. 594, must have discretion to “permit consultation between counsel and defendant” during the recess “but forbid discussion of ongoing testimony,” id. at 284 n. 8, 109 S.Ct. 594 (emphases added). This observation finds resonance in part of the trial court’s rationale for the nondisclosure order in Contreras’s case. Focusing on the truth-seeking function of a trial, the court was concerned that Contreras — having evinced no prior knowledge of the Note— should not be handed new information that would help him to present a defense that was fabricated.

In sum, even viewing the duration of the trial court’s order here as longer than that of the order disapproved in Geders, the ban with regard to the Note was not contrary to the holdings in Geders and Perry.

Second, we also cannot conclude that the New York Court of Appeals’ rejection of Contreras’s Sixth Amendment challenge involved an unreasonable application of Geders and Perry. To begin with, we see two additional differences between the prohibition in this case and those in Geders and Perry. One is that the prohibitions in Geders and Perry were total bans against any communications between the defendant and his attorney during the period at issue, whereas here, the trial court’s order prohibited Note-related communication in only one direction. Contreras’s attorney was prohibited from making such disclosures to Contreras; but that order in no way prevented Contreras from raising the matter of the Note — if in fact Contreras was independently aware of the Note— with the attorney. Thus, the court told counsel that if, “absent your showing it to him[,] he voluntarily says that among the things that got me totally annoyed was that [I] picked this up and I read it, ... well, that’s another story.” (Tr. 199.)

Moreover, that statement by the court affects the proper perception of the prohibition’s duration, because it suggested that if, without disclosures by counsel, Contreras indicated that he was already aware of the Note, the prohibition against Note-related disclosures by the attorney to Contreras could be lifted. And as discussed above, the nondisclosure order itself indicated that disclosure could be made if there were a further order of the court. It was likely within Contreras’s power, therefore, to shorten the duration of the ban on disclosures by counsel if Contreras had in fact known of the Note.

In sum, the prohibition in Contreras’s case differed from those at issue in Geders and Perry in both substance and potential duration. The ban here was limited as to subject matter, did not prohibit discussion of that subject matter if initiated by Contreras from his independent knowledge, and was subject to termination if Contreras showed that he had such knowledge. Given these differences, along with the Geders Court’s explicit refusal to “deal with[ ] ... other circumstances” than a 17-hour ban on defendant-attorney communications “ ‘about anything,’ ” 425 U.S. at 91, 96 S.Ct. 1330, and Perry’s endorsement of a defendant-attorney communications ban directed at one topic while allowing discussion of all others, Contreras has failed to satisfy the highly deferential AEDPA standard.

2. Attendance at the Admissibility Hearing

Contreras also argues that, in excluding him from the Admissibility Hearing on the Note, the trial court violated his right under the Due Process Clause to be present at a critical stage of his trial and that, in rejecting this claim, the New York Court of Appeals unreasonably applied Supreme Court precedent as established in Stincer, 482 U.S. 730, 107 S.Ct. 2658, Gagnon, 470 U.S. 522, 105 S.Ct. 1482, and Snyder, 291 U.S. 97, 54 S.Ct. 330. We reject this contention as well.

Although at common law, “[a] leading principle that pervade[d] the entire law of criminal procedure [wa]s that, after indictment ..., nothing shall be done in the absence of the prisoner,” Lewis v. United States, 146 U.S. 370, 372, 13 S.Ct. 136, 36 L.Ed. 1011 (1892), the federal constitutional right has been held to be less sweeping. In Snyder, the Supreme Court ruled that there was no due process violation when the jury was taken, with the judge and defense counsel but without the defendants, to view the scene of the crime of which the defendants were accused. See 291 U.S. at 103-05, 122, 54 S.Ct. 330. In Gagnon, the Court found no violation when the trial court held an in camera conference, unattended by the defendants and most of their attorneys, to question a juror who had expressed concern that one of the defendants during the trial was making a sketch of the juror’s face. See 470 U.S. at 526-27, 105 S.Ct. 1482. And in Stincer, the Court found no violation when the trial court — in the absence of the defendant but in the presence of his attorney, who was permitted to conduct cross-examination^conducted an in camera hearing to determine whether the young children the defendant was accused of molesting were competent to testify at trial. See 482 U.S. at 747, 107 S.Ct. 2658.

The test applied in each case was whether,' in light of the record as a whole, see, e.g., Gagnon, 470 U.S. at 526-27, 105 S.Ct. 1482; Snyder, 291 U.S. at 115, 54 S.Ct. 330, the defendant’s presence at the proceeding in question would have contributed to his opportunity to defend himself against the charges. Where a review of the record makes clear that the defendant “could have done nothing had [he] been at the [proceeding], nor would [he] have gained anything by -attending,” Gagnon, 470 U.S. at 527, 105 S.Ct. 1482, no constitutional violation will be found on the basis of his absence. Thus, the Court has stated that “due process clearly requires that a defendant be allowed to be present ‘to the extent that a- fair and just hearing would be thwarted by his absence’”; that is, he “is guaranteed the right to be present at any stage of the criminal proceeding that is critical to its outcome if his presence would contribute to the fairness of the procedure.” Stincer, 482 U.S. at 745, 107 S.Ct. 2658 (quoting Snyder, 291 U.S. at 108, 54 S.Ct. 330). But “the Court has emphasized that this privilege of presence is not guaranteed ‘when presence would be useless, or the benefit but a shadow.’ ” Stincer, 482 U.S. at 745, 107 S.Ct. 2658 (quoting Snyder, 291 U.S. at 106-07, 54 S.Ct. 330). Accordingly, “ ‘[t]he presence of a defendant is a condition of due process to the extent that a fair and just hearing would be thwarted by his absence, and to that extent only.’ ” Gagnon, 470 U.S. at 526, 105 S.Ct. 1482 (quoting Snyder, 291 U.S. at 107-08, 54 S.Ct. 330).

As discussed in Part II.A. above, the record in this case is consistent with the state court’s conclusion that Contreras’s absence from the proceeding did not materially undermine “the fairness of the procedure,” Contreras II, 12 N.Y.3d at 273, 879 N.Y.S.2d at 372, 907 N.E.2d 282, in violation of his due process right to be present. His attorney was allowed to cross-examine Y.A. on the Note. Contreras himself was not competent to speak on what was in Y.A.’s mind when she wrote the Note; there is no indication that Contreras had independent knowledge of the Note; and he has not called to our attention any reason to believe that his presence at the Admissibility Hearing could have assisted either his attorney or the court in asking questions that would have resulted in a more reliable determination as to what Y.A. had meant by the words she had written.

Contreras also summarily suggests that his exclusion from the Admissibility Hearing violated his rights under the Confrontation Clause. (See Contreras brief on appeal at 47.) That contention fails for the same reasons that his due process claim fails — and in particular because his counsel was ultimately permitted to cross-examine Y.A. about the Note, see, e.g., Stincer 482 U.S. at 739, 107 S.Ct. 2658 (“[T]he Confrontation Clause guarantees only ‘an opportunity for effective cross-examination, not cross-examination that is effective in whatever way, and to whatever extent, the defense might wish.’ ”) (quoting Delaware v. Fensterer, 474 U.S. 15, 20, 106 S.Ct. 292, 88 L.Ed.2d 15 (1985) (emphasis in Fensterer)).

Finally, we note that, as the New York Court of Appeals observed in Contreras II, the very purpose of a court’s in camera hearing to determine the prosecution’s duty to disclose evidence to the defendant, under either Brady or Rosario, precludes the defendant’s entitlement to be present at the hearing. See 12 N.Y.3d at 273, 879 N.Y.S.2d at 372, 907 N.E.2d 282. While ex parte proceedings are generally discouraged, it is well established that where “there is a question as to the relevance or materiality of a given group of documents,” the government may submit the documents to the court for the judge’s independent in camera review. United States v. Wolfson, 55 F.3d 58, 60 (2d Cir.) (“Wolfson”), cert. denied, 516 U.S. 990, 116 S.Ct. 521, 133 L.Ed.2d 429 (1995); see also United States v. Leung, 40 F.3d 577, 582 (2d Cir.1994) (“Leung”) (“[I]n some circumstances the trial court should not rely on the Government’s representations ..., but should instead undertake an independent in camera review of relevant Government files to determine materiality.”). The nature of such proceedings precludes the defendant’s participation: Where the very question at issue is whether the prosecution is obliged to reveal certain material to the defendant, the inquiry cannot begin by revealing that material to the defendant. As we have recognized, a “defendant’s Brady request for discovery of exculpatory materials or materials with which to impeach a government witness ... does [not] give the defendant the right to assess materiality himself.” Wolfson, 55 F.3d at 60; see also Leung, 40 F.3d at 583 (a Brady hearing does not “provide a general discovery device for the defense,” nor an opportunity to learn “the contents of Government files in order to present arguments in favor of disclosure”). Rather, the point of the court’s in camera review is to ensure the disclosure of exculpatory evidence while “preserving] the confidentiality of those documents that the court determines need not be disclosed.” Wolfson, 55 F.3d at 60 (emphasis added).

That procedure is one we should encourage. In the typical case, after all, the prosecution may preserve its right to reach its own determinations as to which evidence it will disclose to the defendant. See Leung, 40 F.3d at 582. In some circumstances, however, where disclosure can “make the difference between acquittal and conviction,” we have urged that the defendant’s access to potentially exculpatory evidence should not depend “solely on the representations of the government.” United States v. Kiszewski, 877 F.2d 210, 216 (2d Cir.1989). Supplementing “the Government’s assessment of materiality with the impartial view provided by the trial judge,” Leung, 40 F.3d at 588, the. court’s in camera inspection provides a check on the prosecution’s determinations and helps protect the defendant’s rights to an effective defense at trial.

Here, assuming that the Note was not in fact Brady material (as we must at .‘this stage — no Brady claim was asserted in Contreras’s habeas petition, or even in his state-court appeals), the trial court did more than was required in its in camera hearing, inviting Contreras’s counsel to review the document in issue and examine the witness about its nature and relevance. These actions, which underlie Contreras’s claims that he had a right to be present, reflect the court’s care in insuring that it reached a full and fair in camera determination. Where, as in this case, the state holds potentially exculpatory evidence, we should not discourage prosecutors from disclosing that material for the court’s impartial review, or discourage courts from examining witnesses in order to clarify the facts, by holding that such actions effectively mandate disclosure of the evidence to the defendant.

We conclude that Contreras’s contention that the New York Court of Appeals violated or unreasonably applied Supreme Court precedents in rejecting his right-to-be-present claim is meritless.

In sum, given our AEDPA-limited role in reviewing habeas petitions to set aside state-court judgments, our consideration here is limited to the question of whether the decisions of the New York courts rejecting Contreras’s constitutional claims were “contrary to” or an “unreasonable application of’ clearly established United States Supreme Court precedent. We hold that they were not. Whether one or another of us might have reached different conclusions on direct review of constitutional claims such as these is irrelevant.

CONCLUSION

We have considered all of Contreras’s arguments in support of his appeal and have found them to be without merit. The judgment of the district court is affirmed.  