opinion: GEORGE C. PRATT, Circuit Judge:
  On September 3, 1987, Chief Judge Daly of the District Court for the District of Connecticut entered sua sponte identical orders in five civil rights cases that were brought under 42 U.S.C. § 1983, dismissing all pendent state law claims and all claims brought against police officer defendants in their official capacities. These sua sponte orders were filed without notice or an opportunity to be heard. After noting that official capacity suits “ ‘generally represent only another way of pleading an action against an entity of which an officer is an agent’ ” (quoting Monell v. New York City Dep’t of Social Services, 436 U.S. 658, 690 n. 55, 98 S.Ct. 2018, 2035, n. 55, 56 L.Ed.2d 611 (1978)), and that, in each case, the officers’ employers (the cities of Milford, Hamden, Bridgeport and New Haven, and the state of Connecticut) had not been made a party, the court ordered “that any reference to the individual defendants being sued in their official capacity be hereby stricken.” After noting further that the exercise of pendent jurisdiction is discretionary, and that it had “given regard to all relevant considerations, including the potential for jury confusion,” the district court also dismissed plaintiffs’ state law claims in each of the five actions. Plaintiffs in all five actions were represented by the same firm of attorneys.
  After plaintiffs in each case moved for partial judgment pursuant to Fed.R.Civ.P. 54(b), the district court stamped the motions in all of the cases except Carter with the following notation: “DECEMBER 21, 1987. There appearing no just reason for delay, the motion for final judgment on the pendent state law claims and the official capacity claim is GRANTED absent objection. Partial final judgment shall enter accordingly.” These orders were signed by Chief Judge Daly. In Carter, Judge Egin-ton denied plaintiffs’ initial motion for certification on December 17, 1987. After Chief Judge Daly granted certification in the other four cases, Judge Eginton granted a subsequent motion for reconsideration in Carter. That motion was stamped, “January 7, 1988: The motion is GRANTED. After reconsideration, the motion for partial judgment, Fed.R.Civ.P. 54(b), is granted.” All plaintiffs appealed, but one of the cases was apparently settled prior to argument of the appeals. A brief description of the remaining four actions follows.
  Brawn v. Dooling was brought against four Milford police officers by the parents of a 13-year-old boy who committed suicide. The § 1983 complaint asserts that the defendants, who responded to a report that the boy was about to kill himself but then left the boy alone without conducting any significant investigation, acted with deliberate indifference to plaintiffs’ constitutional rights. See Doe v. New York City Dep’t of Social Services, 649 F.2d 134, 141 (2d Cir.1981), cert. denied, 464 U.S. 864, 104 S.Ct. 195, 78 L.Ed.2d 171 (1983). The complaint includes a pendent state law negligence claim based on the same facts, and seeks compensatory and punitive damages and “such other relief as this court may consider to be just, fair and equitable.” The sua sponte order was entered one year after the defendants answered the complaint.
  The four plaintiffs in Carter v. Kennelly alleged that two Hamden police officers violated various constitutional rights and §§ 1983 and 1988 by conducting an illegal search and seizure. The complaint alleges a number of state law claims, including negligence, intentional infliction of emotional distress, and wrongful seizure of property. Plaintiffs seek money damages and an injunction requiring the defendants to return the seized property. In this case the sua sponte order was entered before the defendants answered the complaint.
  Perez v. Ortiz was brought by a mother and daughter against three Bridgeport police officers for constitutional violations arising from false arrest, excessive force, and malicious prosecution. Pendent state claims based on the same facts include assault and battery, intentional infliction of emotional distress, and malicious prosecution. Plaintiffs seek money damages and “such other relief as the court shall consider to be fair and equitable.” The sua sponte order was entered before returns of service were filed and three months before answers were filed.
  The plaintiff in Zapp v. Casabarra alleges that New Haven police officers violated her constitutional rights by entering her home without a warrant, arresting her without probable cause, and subjecting her to malicious prosecution and excessive force. In addition to her § 1983 claim, she asserts state law claims for trespass, assault and battery, and malicious prosecution. She seeks compensatory and punitive damages and “such other relief as this Court considers just, fair and equitable”. The sua sponte order was filed four months after defendants’ answer.
  On appeal plaintiffs argue that Chief Judge Daly adopted a per se rule of refusing ever to entertain pendent state law claims in civil rights actions and erred in dismissing the pendent state law claims in these cases without engaging in any case-specific analysis. Plaintiffs argue as well that the district court erred in dismissing the claims against police officers in their official capacities without affording the plaintiffs notice and an opportunity to be heard or an opportunity to amend their complaints.
  In none of these four cases did defendants seek the relief granted in the sua sponte orders, but all of the defendants argue that the dismissals were appropriate. The Zapp and Perez defendants argue, as well, that the district court erred in granting the plaintiffs’ motion for partial judgment because the plaintiffs did not show the absence of just reason for delay as required by rule 54(b).
  Preliminarily, although we recognize that the district court’s compliance with rule 54(b) may have fallen short of the standard we have required in earlier cases, we conclude that the policies underlying rule 54 will be served by our exercising jurisdiction over these appeals. On the merits of the appeals, we conclude that the district court abused its discretion in entering the sua sponte dismissal orders in these cases.
  DISCUSSION
  1. Certification under Fed.R.Civ.P. 54(b)
  Rule 54(b) allows the district court to “direct the entry of a final judgment as to one or more but fewer than all of the claims or parties only upon an express determination that there is no just reason for delay and upon an express direction for the entry of judgment.” It provides an exception to the general rule that final judgment is entered only when all claims have been adjudicated. See Cullen v. Margiotta, 811 F.2d 698, 710 (2d Cir.1987), cert. denied, — U.S.-, 107 S.Ct. 3266, 97 L.Ed.2d 764 (1987).
  In previous cases we have interpreted rule 54(b) as requiring a district court to do more than “ ‘merely repeat the formulaic language of the rule, but rather * * * [to] offer a brief, reasoned explanation.’ ” Ansam Associates, Inc. v. Cola Petroleum, Ltd., 760 F.2d 442, 445 (2d Cir.1985) (quoting Cullen v. Margiotta, 618 F.2d 226, 228 (2d Cir.1980)). One reason for this requirement is to avoid “piecemeal appeals”. Curtiss-Wright Corp. v. Gen. Electric Co., 446 U.S. 1, 10, 100 S.Ct. 1460, 1466, 64 L.Ed.2d 1 (1980). See 760 F.2d at 445; Cullen, 618 F.2d at 228; Brunswick Corp. v. Sheridan, 582 F.2d 175, 183 (2d Cir.1978); see also Campbell v. Westmoreland Farm, Inc., 403 F.2d 939, 942 (2d Cir.1968) (“Rule 54(b) orders ‘should not be entered routinely or as a courtesy or accommodation to counsel’ ”) (citation omitted).
  The Supreme Court, however, has indicated “that the standard against which a district court’s exercise of discretion [in granting certification] is to be judged is ‘the interest of sound judicial administration.’ ” Curtiss-Wright Corp., 446 U.S. at 10, 100 S.Ct. at 1466 (citing Sears, Roebuck & Co. v. Mackey, 351 U.S. 427, 437, 76 S.Ct. 895, 901, 100 L.Ed. 1297 (1956)). Although the district court in these cases did not explicitly engage in the analysis of all the factors the Supreme Court has set out as relevant to the exercise of discretion under rule 54(b), see id. at 7-9, 100 S.Ct. at 1464-65, we conclude that the interests of sound judicial administration will be served by our exercising jurisdiction over this appeal.
  The record before us indicates that Chief Judge Daly, who must daily grapple with managing a crowded civil docket, has utilized the same procedural device in five civil rights cases, four of which are now before us. By granting a rule 54(b) certification he (and Judge Eginton) provided a prompt and efficient means for obtaining appellate review of that procedure. Were we to remand for a statement of reasons it is obvious what reasons Chief Judge Daly would provide: multiple cases are involved; a dispositive issue affects a major part of each suit; substantial trial time will be saved; if the procedure invoked is permissible, substantial time in other cases can be saved. If we do not rule now on the merits of these appeals, the same issues may have to be relitigated not only later in these four cases but possibly in other cases as well. If this were a single case we might have doubts about the propriety of the rule 54(b) certification, but when four appeals are involved, we have no doubt that the “interest of sound judicial administration” will be served by our resolving now the threshold procedural issues raised by these appeals.
  As another panel of this court stated in an appeal arising from a sua sponte dismissal for failure to state a claim that was ordered without notice, “[w]e are troubled by the procedural aspects of th[ese] dismissal[s].” Schlesinger Investment Partnership v. Fluor Corp., 671 F.2d 739, 742 (2d Cir.1982). Not only were they ordered both sua sponte and without notice to plaintiffs, but they were also imposed across-the-board by this particular district judge on five separate civil rights cases. Both of these problems require discussion.
  2. Sua sponte dismissal
  Although sua sponte dismissals may be appropriate in some circumstances, see Leonhard v. United States, 633 F.2d 599, 609 n. 11 (2d Cir.1980) (citing Robins v. Rarback, 325 F.2d 929 (2d Cir.1963), cert. denied, 379 U.S. 974, 85 S.Ct. 670, 13 L.Ed.2d 565 (1965); 5 C. Wright & A. Miller, Federal Practice and Procedure § 1357 at 593 (1969)); Taub v. Hale, 355 F.2d 201, 202 (2d Cir.), cert. denied, 384 U.S. 1007, 86 S.Ct. 1924, 16 L.Ed.2d 1020 (1966); Fed.R.Civ.P. 12(e), particularly in cases involving frivolous in forma pauperis complaints, see 28 U.S.C. § 1915(d); 2A Moore’s Federal Practice § 12.07 [2. — 5] (1987), or frivolous habeas petitions, see Rule 4 of the Rules Governing Section 2254 Cases in the United States District Courts (1987), the general rule is that a “district court has no authority to dismiss a complaint for failure to state a claim upon which relief can be granted without giving the plaintiff an opportunity to be heard.” Square D Co. v. Niagara Frontier Tariff Bureau, Inc., 760 F.2d 1347, 1365 (2d Cir.1985) (“Failure to afford an opportunity to address the court’s sua sponte motion to dismiss is, by itself, grounds for reversal”) (quoting Lewis v. New York, 547 F.2d 4, 5-6 & n. 4 (2d Cir.1976)), aff'd, 476 U.S. 409, 106 S.Ct. 1922, 90 L.Ed.2d 413 (1986); see Eades v. Thompson, 823 F.2d 1055, 1061 (7th Cir.1987) (“sua sponte dismissals * * * are not favored, particularly where no party has * * * raised the issue, and there is no notice or hearing”); Doe v. St. Joseph’s Hospital of Ft. Wayne, 788 F.2d 411, 415 (7th Cir.1986) (“Sua sponte dismissals without prior notice or an opportunity to be heard on the issues underlying the dismissal * * * ‘generally may be considered hazardous.’ ”) (quoting Tamari v. Bache & Co. (Lebanon) S.A.L., 565 F.2d 1194, 1198 (7th Cir.1977), cert. denied, 435 U.S. 905, 98 S.Ct. 1450, 55 L.Ed.2d 495 (1978)); Jefferson Fourteenth Assoc. v. Wometco de Puerto Rico, 695 F.2d 524, 525, 527 (11th Cir.1983) (sua sponte dismissal of third-party claims “on the merits” deprived third-party plaintiff of due process); Schlesinger Investment, 671 F.2d at 742-43 (plaintiff entitled to notice that court was considering dismissal, and to discovery and leave to replead).
  As we have noted before, “adequate notice helps the court secure a just determination”, Schlesinger Investment, 671 F.2d at 742, by giving parties moved against the opportunity to present their best arguments in opposition. Id. See Doe v. St. Joseph’s Hospital, 788 F.2d at 415 (“sua sponte dismissals may prejudice plaintiffs by depriving them of an opportunity to amend their complaints or to argue against the dismissal”). Sua sponte dismissals, especially those entered without notice, also deviate from the traditions of the adversarial system by making the judge “ ‘a proponent rather than an independent entity’ ”. Id. (citation omitted); accord Lewis, 547 F.2d at 5 (“[i]t is prudent for judges to avoid an inquisitorial role”). Finally, such dismissals may tend to produce the very effect they seek to avoid — a waste of judicial resources — by leading to appeals and remands.
  In two of the cases before us, Carter and Perez, the claims were dismissed before defendants filed their answers. In Zapp, the dismissal came four months after the defendants had filed an answer admitting that the court had pendent jurisdiction and that plaintiffs could sue defendants in their official capacities. In no case did defendants seek the relief that was granted. Under these circumstances, the district court’s orders were, at best, premature. We hold, therefore, that the district court erred in dismissing these claims sua sponte without giving plaintiffs notice and an opportunity to be heard.
  3. Official capacity claims
  It was also an abuse of discretion to dismiss the suits against the police officers in their official capacities without giving the plaintiffs an opportunity to amend their complaints to conform to the requirements for an official capacity suit. Cf. Brandon v. Holt, 469 U.S. 464, 469-71, 105 S.Ct. 873, 876-77, 83 L.Ed.2d 878 (1985) (where it was clear that action was against defendant in official capacity, plaintiffs allowed to amend pleadings post-trial to conform to proof where § 1983 suit did not name city as defendant because case was filed before Monell was decided). See generally Batista v. Rodriguez, 702 F.2d 393, 397 (2d Cir.1983) (discussing elements of official capacity suit that must be pleaded and proved). Although it is difficult to assess the nature of plaintiffs’ claims on the scanty record before us, we note that at least one set of plaintiffs, in Carter, seeks an injunction ordering the return of property, and that it is entirely proper, when seeking injunctive relief, to sue officials in their official capacities. See Kentucky v. Graham, 473 U.S. 159, 167 n. 14, 105 S.Ct. 3099, 3106 n. 14, 87 L.Ed.2d 114 (1985); Ross v. Meese, 818 F.2d 1132, 1135 (4th Cir.1987).
  4. Pendent jurisdiction over state law claims
  The exercise of pendent jurisdiction is a matter committed to the sound discretion of the district court. See Hagans v. Lavine, 415 U.S. 528, 545, 94 S.Ct. 1372, 1383, 39 L.Ed.2d 577 (1974) (citing United Mine Workers v. Gibbs, 383 U.S. 715, 86 S.Ct. 1130, 16 L.Ed.2d 218 (1966)); Federman v. Empire Fire & Marine Ins. Co., 597 F.2d 798, 809 (2d Cir.1979), See generally Pride v. Community School Bd. of Brooklyn, 482 F.2d 257, 271-72 (2d Cir.1973) (discussion of factors for determining whether to exercise pendent jurisdiction). In these civil rights cases, the parties, the events, and even the conduct complained of were the same for both federal and state claims. Yet when the district court entered identical orders dismissing all pendent state law claims, it stated only that it had “given regard to all relevant considerations, including the potential for jury confusion.” Because the court did not have before it the facts and arguments of the individual cases as they might have been presented in opposition to motions to dismiss, and because the judge simultaneously entered identical orders that contained no case-specific analysis that might support the dismissals in one or more of these cases, we conclude that the district court simply failed to exercise its discretion and therefore erred.
  We have no way of knowing whether Chief Judge Daly has adopted a general policy or per se rule of dismissing pendent state claims and official capacity claims in civil rights cases or whether he simply adopted that approach in these five cases. In either event, the application of a per se rule to a matter that requires the exercise of discretion would constitute reversible error. See Plunkett v. Johnson, 828 F.2d 954, 956 (2d Cir.1987); cf. Lis v. Robert Packer Hospital, 579 F.2d 819, 819-24 (3d.Cir.1978) (district court failed to exercise its discretion by adopting practices of allowing cross-examination beyond the scope of direct in “every case unless it causes confusion” and of bifurcating all negligence cases).
  CONCLUSION
  In all four cases the judgments are reversed, and the cases are remanded for further proceedings.