MEMORANDUM **
Rickey A. Beaver, a former detainee in two King County jails, appeals pro se from the district court’s judgment dismissing his 42 U.S.C. § 1983 action under 28 U.S.C. § 1915(e)(2)(B)(ii). We have jurisdiction under 28 U.S.C. § 1291. We review de novo. Barren v. Harrington, 152 F.3d 1193, 1194 (9th Cir.1998) (order). We reverse and remand.
The conclusion that Beaver’s first claim was barred by Heck v. Humphrey, 512 U.S. 477, 114 S.Ct. 2364, 129 L.Ed.2d 383 (1994), was improper because the claim did not necessarily imply the invalidity of Beaver’s continuing confinement. See Butterfield v. Bail, 120 F.3d 1023, 1024 (9th Cir.1997) (explaining that Heck bars § 1983 challenges which would necessarily imply the invalidity of the judgment or continuing confinement). Beaver did not seek earlier release but rather an earlier court hearing or confinement in a mental health facility rather than a jail. See Rev. Code Wash. § 10.77.220. Accordingly, Beaver’s first claim is not Heck-barred.
The determination that res judicata barred Beaver from relitigating his second claim, concerning his sleep medication, was also improper. Beaver could not have asserted this claim in the previous action because it concerned events that took place after the previous action. See Greg*237ory v. Widnall, 153 F.3d 1071, 1074 (9th Cir.1998) (per curiam) (“Res judicata (or claim preclusion) bars all grounds for recovery which could have been asserted, ... in a prior suit between the same parties on the same cause of action.”) (citation omitted) (emphasis added).
On remand, the district court should consider whether Beaver is entitled to amend his complaint. See Lopez v. Smith, 203 F.3d 1122, 1130-31 (9th Cir.2000) (en banc).
Beaver shall bear his own costs on appeal.
REVERSED and REMANDED.
This disposition is not appropriate for publication and is not precedent except as provided by Ninth Circuit Rule 36-3.