Plaintiff-appellant Kirk Spencer brought this civil rights action under 42 U.S.C. § 1983 alleging that he was sexually abused as a juvenile at the Harlem Valley Secure Center (“HVSC”) while in the custody of the New York- State Division for Youth (“NYS-DY”). His amended complaint names as defendants these two state agencies, the HVSC teacher who allegedly abused him, his eoun-selor/therapist at HVSC, and various named and unnamed officials of HVSC and NYSDY. Prior to service on defendants, the district judge, the Hon. Alfred V. Covello, partially dismissed sua sponte Spencer’s pro se and in forma pauperis (“Lf.p.”) complaint under 28 U.S.C. § 1915(e)(2) (Supp.1997). Subsequently, the district court dismissed the remainder of the complaint pursuant to Fed. R.Civ.P. 41(b). Spencer now appeals these dismissals.
I. BACKGROUND
In his original, pro se complaint filed on March 19, 1996, Spencer alleged that as a sixteen-year-old he was sexually abused by his HVSC science teacher, Pricilla Johnson, his senior by some thirty years. He also claimed that when he reported the incidents, his counselor/therapist at HVSC,' Charles Salvador, threatened him and “tricked” him into believing that he was at fault. He asserts that he “was taken advantage of by the Administration” and by Johnson. Spencer’s original complaint named only Johnson and Salvador as defendants (in both their official and individual capacities), and sought from each $7 million in damages. He also sought therapy and counseling at their expense.
Spencer was granted leave to proceed i.f.p., and the U.S. Marshal’s Office was directed to serve the complaint and summons on Johnson and Salvador. Service was not effected because neither defendant was still working at HVSC.
*110On September 24, 1996, Spencer filed an amended pro se complaint wMch restated his claims against Johnson and Salvador and added the following new defendants in their official and individual capacities: John Johnson and Edward Bartley,, the Director and Executive Director, respectively, of NYSDY; the Director, Assistant Director, and principal of HVSC (all unnamed); and the entities of HVSC and NYSDY. The amended complaint seeks the same relief as the original complaint.
On the same day, an order was issued by Magistrate Judge Fitzsimmons, directing Spencer to provide the court with Johnson’s and Salvador’s current‘addresses within thirty days. This order was filed a few hours before the amended complaint was filed.
On October 1, 1996, one week after the order was entered, Spencer filed á motion for an extension of time for responding to the order. Speiicer asserted that his amended complaint satisfied the order by naming new defendants and providing their proper addresses and requested an extension pending review of his amended complaint. Magistrate Judge Margolis granted this motion two months later, on December 3,1996.
On December 9, 1996, the district court (Judge Covello), sua sponte, reviewed the amended complaint and dismissed the claim for monetary damages against all defendants in their official capacities based on Eleventh Amendment immunity. It also dismissed the claims against the supervisory personnel in their individual capacities on the ground that thé doctrine of respondeat superior is inapplicable to § 1983 cases. Finally, the court dismissed HVSC and NYSDY from the lawsuit on the ground that state agencies are not “persons” under § 1983. The court retained the individual-capacity claims against the original defendants, Johnson and Salvador, and ordered Spencer to provide their current addresses within twenty days.
In response to this second order, Spencer moved for the court’s assistance in obtaining Johnson’s and Salvador’s addresses. The motion was dated December 17, 1996, but was not filed until December 30 (December 29, the date by which Spencer was to have provided the addresses, was a Sunday). In his motion, Spencer asserted that because of his imprisonment he had neither the ability nor the means to obtain Johnson’s and Salvador’s current addresses, and asked that the court compel NYSDY and HVSC (whose addresses Spencer provided) to disclose any information that could be useful in locating Johnson and Salvador.
Shortly thereafter, Spencer'filed two additional documents. The first was a notice of appeal from the dismissal of the additional defendants and a request for extension of time to provide the addresses. It was dated December 15, 1996 but was not filed until January 3, 1997. The second document was a motion for reconsideration in which Spencer argued that his amended complaint did not merely allege respondeat superior liability. ' This motion was dated December 17, 1996 and apparently received by the court on January 7, 1997 but, for undisclosed reasons, was not docketed until January 15.
On the same day the motion for reconsideration was docketed, Judge Covello issued two rulings. First, the court denied the motion for assistance, stating that it could not compel NYSDY. or HVSC to provide the requested information because they were no longer parties' to the 'action (having been dismissed by the December 9, 1996 ruling). Second, the court dismissed sua sponte the remaining claims against Johnson and Salvador in their individual capacities pursuant to Fed.R.Civ.P. 41(b). The stated ground for dismissal was that Spencer had failed to comply with two direct court Orders requiring him to produce current addresses for Johnson and Salvador. The court further stated: “These actions evidence a lack of good faith in prosecuting this case. The court also notes that the plaintiff failed to evidence any attempts to comply with the court’s orders.”
Finally, on February 18, 1997, the court denied Spencer’s motion for reconsideration as untimely.
II. DISCUSSION
A Section 1915(e)(2) Dismissal
Section 1915(e)(2), as amended in 1996, mandates that a district court “shall dismiss” *111an i.f.p. case “at any time” if it determines that the action “(i) is frivolous or malicious; (ii) fails to state a claim on which relief may be granted; or (iii) seeks monetary relief against a defendant who is immune from such relief.” 28 U.S.C. § 1915(e)(2)(B)®-(iii). We begin by noting that with respect to each category of claims in Spencer’s amended complaint, it is unclear on which provision^) of § 1915(e)(2)(B) the district court relied in dismissing them. In its December 9, 1996 ruling and order, the district court cited § 1915(e)(2)(B)(i)-(iii), but did not specifically apply the terms of any of those subsections. However, regardless of which provision it invoked, we conclude that the district court erred in dismissing the claims against the individual defendants in their individual capacities.
In discussing the applicability of these provisions to Spencer’s claims, we will consider first the claims against HVSC and NYSDY, then the claims against the individual defendants in their official capacities, and finally the claims against the individual defendants in their individual capacities.
State Agencies. Neither a state nor one of its agencies nor an official of that agency sued in his or her official capacity is a “person” under § 1983. See Hafer v. Melo, 502 U.S. 21, 26, 112 S.Ct. 358, 362, 116 L.Ed.2d 301 (1991) (citing Will v. Michigan Dep’t of State Police, 491 U.S. 58, 71, 109 S.Ct. 2304, 2312, 105 L.Ed.2d 45 (1989)). Accordingly, the district court dismissed the claims against HVSC and NYSDY as “laek[ing] an arguable legal basis under section 1983.” (Ruling and Order, dated December 9, 1996, at 5-6.) This dismissal for frivolousness was proper under § 1915(e)(2)(B)®. See Neitzke v. Williams, 490 U.S. 319, 325, 327, 109 S.Ct. 1827, 1831-32, 1832-33, 104 L.Ed.2d 338 (1989) (a complaint is frivolous under § 1915(d) where it lacks even an arguable basis in law).
Official-capacity claims. In dismissing the claims against the individual defendants in their official capacities, the district court apparently relied on § 1915(e)(2)(B)(iii). At all relevant times, ail of these defendants were officials of either HVSC or NYSDY. Noting that the Eleventh Amendment immunizes state officials sued for damages in their official capacity, see Kentucky v. Graham, 473 U.S. 159, 169, 105 S.Ct. 3099, 3107, 87 L.Ed.2d 114 (1985), the court dismissed the official-capacity claims because they sought damages of $7 million from each defendant. The dismissal of these claims was proper.
In addition, to the extent that these state agency officials were sued in their official capacity, they are not “persons” under § 1983. See Hafer, 502 U.S. at 26,112 S.Ct. at 362. Thus, the claims against these individuals in their official capacities are also frivolous, and § 1915(e)(2)(B)® requires their dismissal.
Individual-capacity claims. Spencer’s individual-capacity claims against Johnson and Salvador, which were dismissed pursuant to Rule 41(b), will be discussed separately from those against the other individual defendants named in the amended complaint, which appear to have been dismissed under either § 1915(e)(2)(B)® or § 1915(e)(2)(B)(ii).
The district court dismissed the individual-capacity claims against the Director, Assistant Director, and principal of, HVSC and the Director and Executive Director of NYSDY on the ground that the allegations against them sounded in respondeat superi- or, which is not a .basis for liability under § 1983. See Monell v. New York City Dep’tof Soc. Servs., 436 U.S. 658, 692-95, 98 S.Ct. 2018, 2036-38, 56 L.Ed.2d 611 (1978). To the extent this dismissal was based upon § 1915(e)(2)(B)®, it was improper. Spencer’s allegations clearly are not frivolous. Unlike his claims against HVSC, NYSDY, and the individual defendants in their official capacities, Spencer here has a colorable claim under § 1983, as discussed below, even though he failed to properly state that claim. Simply because a complaint fails to state a claim upon which relief may be granted does not mean that it is frivolous. See Neitzke, 490 U.S. at 328-29, 109 S.Ct. at 1833-34. Therefore, the only arguable basis for dismissing these claims was § 1915(e)(2)(B)(ii).
Considering that pro se complaints must be liberally construed, see Haines v. *112Kerner, 404 U.S. 519, 520, 92 S.Ct. 594, 595-96, 30 L.Ed.2d 652 (1972) (per curiam), the district court’s classification of these claims was unduly restrictive. The court correctly ruled that § 1983 does not encompass vicarious liability and that “a plaintiff must demonstrate the defendant’s direct or personal involvement in the actions which are alleged to have caused the constitutional deprivation.” (Ruling and Order, at 4.) However, we cannot agree with the court’s reading of the amended complaint as failing to allege the personal involvement of the newly added defendants, and as naming these defendants only “because of their supervisory roles.” (Id.)
We have long recognized that supervisors may be “personally involved” in the constitutional torts of their supervisees if: (1) the supervisory official, after learning of the violation, failed to remedy the wrong; (2) the supervisory official created a policy or custom under which unconstitutional practices occurred or allowed such policy or custom to continue; or (3) the supervisory official was grossly negligent in managing subordinates who caused the unlawful condition or event. See Williams v. Smith, 781 F.2d 319, 323-24 (2nd Cir.1986). Here, Spencer’s amended complaint alleged generally that he “was taken advantage of by the administration,” and specifically that each new individual defendant was responsible for “the safety, security, and well-being” of all students or residents of HVSC and/or NYSDY. Under a liberal reading of Spencer’s pro se amended complaint, it alleges not merely a claim of respondeat superior liability but a claim of supervisory liability. Spencer made essentially this point in his motion for reconsideration.
As Spencer also argued in his motion for reconsideration, and as his appellate counsel emphasizes, these allegations may also state a cognizable claim under the Eighth Amendment and under the Due Process Clause of the Fourteenth Amendment on the ground that HVSC and NYSDY officials had an affirmative duty to protect him. See, e.g., DeSha-ney v. Winnebago County Dep’t of Soc. Servs., 489 U.S. 189, 198-99, 109 S.Ct. 998, 1004-05, 103 L.Ed.2d 249 (1989); Boddie v. Schnieder, 105 F.3d 857, 860-62 (2nd Cir.1997); Hayes v. New York City Dep’t of Corrections, 84 F.3d 614, 620-21 (2nd Cir.1996).
Accordingly, the district court’s dismissal of the individual-capacity claims against the Director (John Johnson) and Executive Director (Edward Bartley) of NYSDY, and the Director, Assistant Director, and principal of HVSC (all unnamed) was improper.
B. Rule Jpl (b) Dismissal
The district court dismissed the remaining individual-capacity claims (those against Pricilla Johnson and Charles Salvador) pursuant to Rule 41(b). Rule 41(b) authorizes a court to dismiss an action “[f]or failure of the plaintiff to prosecute or to comply with ... any order of court- Unless the court in its order for dismissal otherwise specifies, a dismissal under this subdivision ... operates as an adjudication upon the merits.” Although not explicitly authorized by the rule, such dismissals may be made sua sponte. See Minnette v. Time Warner, 997 F.2d 1023, 1027 (2nd Cir.1993).
However, Rule 41(b) dismissals are a “harsh remedy” that are “appropriate only in extreme circumstances.” Lucas v. Miles, 84 F.3d 532, 535 (2nd Cir.1996). District courts “should be especially hesitant to dismiss for procedural deficiencies where ... the failure is by a pro se litigant.” Id. Thus, although we review Rule 41(b) dismissals for an abuse of discretion, see Link v. Wabash R.R. Co., 370 U.S. 626, 633, 82 S.Ct. 1386, 1390, 8 L.Ed.2d 734 (1962); Lucas, 84 F.3d at 535; Nita v. Connecticut Dep’t of Envtl. Protection, 16 F.3d 482, 485 (2nd Cir.1994), “deference is due to the district court’s decision to dismiss a pro se litigant’s complaint only when the circumstances are sufficiently extreme.” Lucas, 84 F.3d at 535.
With this in mind, the correctness of a Rule 41(b) dismissal is determined in light of the record as a whole and in consideration of the following factors: (1) the duration of the plaintiff’s failure to comply with the court order; (2) whether the plaintiff was on notice that failure to comply would result in dismissal; (3) whether the *113defendants are likely to be prejudiced by further delay in the proceedings; (4) a balancing of the court’s interest in managing its docket with the plaintiffs interest in receiving a fair chance to be heard; and (5) whether the judge has adequately considered a sanction less drastic than dismissal. See id.; Jackson v. City of New York, 22 F.3d 71, 74 (2nd Cir.1994); Alvarez v. Simmons Mkt. Research Bureau, Inc., 839 F.2d 930, 932 (2nd Cir.1988). Generally, no factor is dis-positive. See Nita, 16 F.3d at 485. Moreover, while district courts are not required to discuss the factors on the record,
... a decision to dismiss stands a better chance on appeal if the appellate court has the benefit of the district court’s reasoning. Furthermore, notions of simple fairness suggest that a pro se litigant should receive an explanation before his or her suit is thrown out of court.
Lucas, 84 F.3d at 535; but see id. at 537 n. 2 (Jacobs, J., dissenting).
Here, weighing of these factors leads us to conclude that the district court abused its discretion. There are two aspects of the first factor: (1) that the failures were those of the plaintiff, and (2) that these failures were of significant duration. See Jackson, 22 F.3d at 75. To begin with, there was no clear “failure” on Spencer’s part to comply with either court order) Spencer responded to the initial order within a week, seeking an extension of time pending review of his amended complaint. The magistrate judge granted his motion, excusing him from compliance with the order pending review of the amended complaint.1 Thus, Spencer did not fail to obey this order.
After reviewing the amended complaint (and dismissing most of it sua sponte), Judge Covello ordered Spencer to produce current addresses for Johnson and Salvador within twenty days (i.e., by December 29, 1996). In response to this second order, Spencer filed a motion for assistance, asserting. that he had neither the means nor ability to locate Johnson and Salvador and requesting that the court order HVSC or NYSDY to produce information regarding their whereabouts. This motion was dated December 17, but was not filed until December 30. However, since December 29 was a Sunday, the motion was filed -within the time limit set by Judge Covello. Moreover, considering the two-week disparity between the signature date and the filing date of the motion for assistance (suggesting that mail from HVSC was not processed with all deliberate speed), Spencer obviously made a conscientious effort to comply with Judge Covello’s order well in advance of the deadline.
Moreover, Judge Covello did not rule on the motion for assistance until January 15, 1997 — the same day that he dismissed the amended complaint under Rule 41(b) for failure to comply with court orders. Under the circumstances, Spencer was justified in believing that his motion for assistance satisfied the court’s order, at least pending a ruling on that motion. Yet Judge Covello seems to have found Spencer to be in violation of the order even as the motion sat in the judge’s chambers awaiting his ruling. Considering that the youthful Spencer was proceeding pro se from a correctional institution, it was unduly harsh to charge him with “failure” to comply with the second order.
With respect to the second factor of the Lucas analysis, although Judge Covello’s order clearly stated that failure to comply would result in dismissal of the action, as noted above Spencer reasonably believed that he had complied with the order and that the threatened sanction had been averted.
The third factor, prejudice to the defendants, is not an issue here; none of the defendants had been served and none were affected by the delay.
As to the fourth factor, there is no indication that Judge Covello balanced the court’s *114interest in calendar management against Spencer’s due process rights. In the circumstances, including the fact that Spencer’s case had been pending for only nine months when it was dismissed, there is no apparent basis for concluding that this factor favored dismissal.
Finally, there is no indication that Judge Covello gave any consideration to the fifth factor — the efficacy of lesser sanctions. A less drastic and more appropriate response would have been an extension of time, especially considering that Judge Covello ruled on Spencer’s motion for assistance at the same time he dismissed the case.
In sum, this is not one of those “rare occasions” when the “drastic' remedy” of Rule 41(b) dismissal was warranted. Colon v. Mack, 56 F.3d 5, 7 (2nd Cir.1995). Judge Covello’s conclusions that “the plaintiff failed to comply with two direct orders of the court,” that “[t]hese actions evidence a lack of good faith in prosecuting this case,” and that “the plaintiff failed to evidence any attempts to comply with the court’s orders,” (Order of Dismissal, dated January 15, 1997, at 2), are inconsistent with the record of Spencer’s diligent efforts to comply with the court’s orders. Dismissal on these grounds was an abuse of discretion.
III. Conclusion
We affirm the dismissal of the claims against the state agencies and all individual defendants in their official capacities. We reverse the dismissal of the individual-capacity claims against Pricilla Johnson and Charles Salvador, the Director and Executive Director of NYSDY, and the Director, Assistant Director, and principal of HVSC. The case is remanded for further proceedings in light of this opinion, which should include providing Spencer with reasonable assistance in locating Johnson and Salvador. See Valentin v. Dinkins, 121 F.3d 72, 76 (2d Cir.1997).
. Contrary to Judge Covello's view, the amended complaint was not filed “[i]n response to the court’s request.” (Order of Dismissal, dated January 15, 1997, at 1.) Spencer prepared the amended complaint before Magistrate Judge Fitzsimmons entered her order, and the order was filed only four hours before the amended complaint was filed. Clearly, Spencer was not using his amended complaint to evade the order, as Judge Covello apparently believed (although Spencer’s subsequent motion for an extension of time reflects that he did believe that his amended complaint satisfied the order).