
    Thomas FLORES, Plaintiff-Appellant, v. Donna E. SHALALA, Secretary, Health and Human Services, Defendant-Appellee.
    No. 92-56039.
    United States Court of Appeals, Ninth Circuit.
    Argued and Submitted Jan. 31, 1994.
    Decided March 9, 1995.
    As Amended on Denial of Rehearing June 5, 1995.
    
      Lawrence D. Rohlfing, Santa Fe Springs, CA, for plaintiff-appellant.
    Dennis J. Mulshine, Dept, of Health and Human Services, San Francisco, CA, for defendant-appellee.
    Before: D.W. NELSON, REINHARDT and BRUNETTI, Circuit Judges.
   REINHARDT, Circuit Judge:

Plaintiff-appellant Thomas Flores appeals the district court’s denial of his motion for attorney’s fees, costs and expenses pursuant to the Equal Access to Justice Act (“EAJA”), 28 U.S.C. § 2412(d), in his action against the Secretary of Health and Human Services (“the Secretary”). Flores contends that he is entitled to the attorney’s fees, costs and expenses incurred in challenging the denial of his application for disability benefits in the district court, and in pursuing benefits at the administrative level after the district court remanded his case to the Secretary. We reverse the district court’s order denying attorney’s fees for the litigation in the district court, because the Secretary’s position on the procedural issues that led to remand was not substantially justified. We also conclude that Flores is entitled to attorney’s fees for expenses incurred during the post-remand administrative proceedings.

I.

Determining whether Flores is entitled to attorney’s fees requires us to retrace the tortured procedural history of this case. This history spans several years and includes two administrative hearings, each of which was followed by a challenge to the ALJ’s decision in district court.

Flores injured his back on the job in June 1985. He was 47 years old at the time of his injury and had worked as a journeyman plumber since the age of 15. In July 1988, he filed for disability insurance benefits under Title II of the Social Security Act, claiming that he had been unable to work since June 10, 1985 due to his lower back injury. After his application was denied both initially and upon reconsideration, Flores made a timely request for an administrative hearing, which was held in September 1989.

The evidence submitted at this hearing included medical records describing his back injury. In addition, Flores submitted a vocational evaluation report from the Testing, Evaluation and Management Work Evaluation Center (“the TEAM report”). The TEAM report assessed Flores’ aptitudes, interests, and prospects for future employment. The results were compiled from approximately ten days of testing and interviewing, during which Flores completed several standardized tests evaluating his mathematical ability, mechanical ability, reading skills, dexterity, and visual ability. Among the findings of this report were that Flores demonstrated “an approximate fifth grade math level” and that he “does not appear able to return to work at this time.”

The Administrative Law Judge (“the ALJ”) issued a decision on December 19, 1989. In this decision, the ALJ concluded that Flores back injury did not meet the requirements set forth in Section 1.05(C) of the medical listings and, therefore, that he was not presumptively disabled. The ALJ then found that Flores’ back injury precluded him from returning to his past relevant work as a journeyman plumber, shifting the burden to the Secretary to demonstrate the existence of jobs that Flores could perform. The ALJ concluded, however, that Flores was not disabled under the statute, because there were a significant number of jobs in the national economy that he could still do, despite his condition. Specifically, the ALJ found that Flores could work as a “sales person in a discount or hardware store.” In support of this conclusion, the ALJ relied on the testimony of a vocational expert who appeared at Flores’ hearing and was asked by the ALJ whether someone of Flores’ age, education, and skills, who was capable of walking or standing for extended periods with some alternation of walking/standing/sitting, would be able to perform any jobs in the national economy. The vocational expert replied that a person with those characteristics would be capable of performing semiskilled sales work at a discount or hardware store. Neither the question posed to the vocational expert nor the ALJ’s ultimate decision took into account the impact that Flores’ cognitive limitations, documented in the TEAM report, would have on his ability to work. In fact, the hypothetical questions asked by the ALJ did not include any reference to the TEAM report and the ALJ’s decision did not even mention it.

Flores appealed the ALJ’s denial of benefits to the Social Security Appeals Council. The Appeals Council affirmed, making the ALJ’s determination the final decision of the Secretary. Flores then filed an action in district court, asserting that the Secretary’s decision was not supported by substantial evidence. Flores argued that the evidence showed that he “is disabled and has been continuously disabled as that term is defined in the Social Security Act.”

The parties agreed to proceed before a United States Magistrate Judge, pursuant to 28 U.S.C. § 686(e). Upon summary judgment motions from both Flores and the Secretary, Magistrate Judge Venetta S. Tasso-pulos entered a Memorandum Opinion and Order of Remand on May 16, 1991. The court affirmed the ALJ’s finding that Flores had not shown that he was presumptively disabled under Section 1.05(C). Nevertheless, it remanded Flores’ case to the Secretary for further proceedings because the ALJ had improperly disregarded the TEAM report, both in the hypothetical question posed to the vocational expert and in the ALJ’s ultimate decision. The court instructed the ALJ to consider the TEAM report on remand in determining whether there were any jobs that Flores was capable of performing despite his impairments.

At the second ALJ hearing, Flores testified that he was getting more exercise, taking less medication, and working three to four days per week managing his brother’s apartment.' This time, the ALJ considered the cognitive limitations documented in the TEAM report. In a decision dated March 27, 1992, the ALJ found that Flores was disabled for a closed period beginning June 10, 1985 and ending March 7, 1988, but was not disabled thereafter. The Appeals Council affirmed the second ALJ decision, and Flores again sought to have the district court review the Secretary’s decision. The parties again agreed to proceed before a magistrate and again the district court determined that the Secretary had erred with respect to Flores’ case. In a decision dated February 14, 1994, Magistrate Judge Elgin Edwards found that Flores had indeed been disabled at all times since June 10, 1985 and not just during the closed period.

During the time between Magistrate Judge Tassopulos’ remand order and the second ALJ decision, Flores filed a motion for attorney’s fees with the district court. At Flores’ request, the motion was stayed pending a decision in .the second ALJ hearing on the merits of his application. After the second ALJ decision (but before Magistrate Judge Edwards’ decision finding that Flores was still disabled), the district court entered an order denying the fee motion. In that decision, dated July 31, 1992, Magistrate Judge Tassopulos reasoned that the Secretary’s position was “substantially justified,” because Flores had not raised the issue of the closed period of disability — the issue on which he prevailed in his second ALJ hearing — at the time of his initial hearing before the ALJ. Flores timely appealed the fee ruling to this court.

II.

Initially, we must decide whether Flores is entitled to attorney’s fees for the first proceeding before the district court, the proceeding that resulted in a remand to the ALJ for purposes of considering the TEAM report. Resolution of this issue requires us to reconsider the rules that govern our determination regarding whether the Secretary’s position is “substantially justified,” in light of the Supreme Court’s recent decisions in Melkonyan v. Sullivan, 501 U.S. 89, 111 S.Ct. 2157, 115 L.Ed.2d 78 (1991) and Shalala v. Schaefer, — U.S. —, 113 S.Ct. 2625, 125 L.Ed.2d 239 (1993). We conclude that we may resolve the question of Flores’ entitlement to attorney’s fees by considering only the procedural issues on which the district court reversed — specifically, the Secretary’s failure to take into account the vocational report discussing the claimant’s cognitive limitations. In this case, we need not consider the Secretary’s position on • any other questions, including the ultimate issue of disability.

In denying attorney’s fees, the district court focused on whether, ultimately, the Secretary was substantially justified in its conclusion on the question of disability. The denial of fees was based in- part on the nowrreversed results of the post-remand administrative hearing in which Flores was found disabled only for a closed period. The court did not consider whether the Secretary was substantially justified in her position on the procedural issue that caused it to remand. In view of Schaefer, we conclude that the district court’s focus on the post-remand proceedings concerning the ultimate issue of disability was erroneous. Instead, the district court should, at least initially, have considered whether the Secretary was substantially justified with respect to the procedural issue on which Flores prevailed in district court. Because the Secretary’s position on the procedural issue was not substantially justified, Flores is entitled to recover attorney’s fees.

A.

A party that prevails against the United States in a civil action is entitled, in certain circumstances, to an award of attorney’s fees, court costs, and other expenses under the EAJA. 28 U.S.C. § 2412. The prevailing party must file an application for attorney’s fees with the court within 30 days of the “final judgment in the action.” 28 U.S.C. § 2412(d)(1)(B). The EAJA creates a presumption that fees will be awarded to prevailing parties. Thomas v. Peterson, 841 F.2d 332, 335 (9th Cir.1988). However, Congress did not intend fee shifting to be mandatory. United States v. 313.34 Acres of Land, 897 F.2d 1473, 1477 (9th Cir.1989). Attorney’s fees are not available if the position of the United States is “substantially justified.” 28 U.S.C. § 2412(d)(1).

In this case, the magistrate judge denied Flores attorney’s fees, because he concluded that the Secretary’s position was substantially justified. We review this decision for an abuse of discretion. Williams v. Bowen, 966 F.2d 1259, 1260-61 (9th Cir.1991). We have held that where the challenged decision “is based on an erroneous conclusion of law” the court has committed an abuse of discretion. Kali v. Bowen, 854 F.2d 329, 331 (9th Cir.1988) (quoting In re Hill, 775 F.2d 1037, 1040 (9th Cir.1985)). The Supreme Court- also applies this form of analysis from time to time; it, too, considers an error of law an “abuse of discretion.” See Cooter & Gell v. Hartmarx Corp., 496 U.S. 384, 405, 110 S.Ct. 2447, 2461, 110 L.Ed.2d 359 (1990) (district court abuses discretion in imposing Rule 11 sanctions if decision is based on error of law). Here we consider an error of law, and thus an abuse of discretion.

B.

Before assessing whether the Secretary’s position was “substantially justified,” we must determine the point at which Flores became the prevailing party. Resolution of this question is important, because it determines the appropriate focus of the district court’s fee inquiry.

The Secretary does not dispute the fact that Flores was the prevailing party. The parties disagree, however, on the question of which decision made him the prevailing party. The Secretary argues that Flores did not become a prevailing party until the ALJ found him disabled for a closed period after the second administrative hearing, and then only “to a very limited extent.” In contrast, Flores asserts that he became a “prevailing party” within the meaning of the EAJA when the district court- remanded his case to the Secretary for consideration of the TEAM report. Accordingly, Flores argues, in order to resolve his request for fees, the district court should have determined whether the Secretary’s position in opposition to the remand was substantially justified.

Prior to the Supreme Court’s recent decisions in Melkonyan v. Sullivan, 501 U.S. 89, 111 S.Ct. 2157, 115 L.Ed.2d 78 (1991), and Shalala v. Schaefer, — U.S. —, 113 S.Ct. 2625, 125 L.Ed.2d 239 (1993), Flores’ argument would have been quickly rejected. Under Swenson v. Heckler, 801 F.2d 1079 (9th Cir.1984), the district court was required to await the completion of remand proceedings before ruling on an EAJA motion, because the claimant could not be considered a prevailing party unless and until he won benefits on remand. Id. at 1080 (“securing a remand on an appeal of an administrative disability decision is insufficient to qualify a claimant as a prevailing party under the EAJA”). In Sullivan v. Hudson, 490 U.S. 877, 109 S.Ct. 2248, 104 L.Ed.2d 941 (1989), the Court appeared to confirm that this approach was correct. Hudson held that the claimant could recover attorney’s fees for work done in administrative proceedings after remand, where those proceedings were critical to vindication of the claimant’s rights. Id. at 889, 109 S.Ct. at 2256. In explaining its decision, the Court stated that when a district court remands a case to the Secretary: “the claimant will not normally attain ‘prevailing party’ status ... until after the result of the administrative proceedings is known.” 490 U.S. at 896, 109 S.Ct. at 2260. This appeared to validate our statement in Swenson that a remand for further proceedings was not sufficient to confer prevailing party status on the claimant.

If Swenson were still the law, the Secretary’s position would'be correct—a Social Security claimant would not become a “prevailing party” unless and until he was ultimately found disabled. Under Swenson, Flores would only have become a “prevailing party” when he finally obtained benefits for a closed period, rather than at the moment of remand. Melkonyan and Schaefer, however, abruptly changed the law on this issue. In Melkonyan, the Court held that an administrative decision cannot be the “final judgment” under the EAJA entitling the claimant to seek attorney’s fees. The. Melkonyan Court drew a sharp distinction between “sentence four” remands and “sentence six” remands of proceedings under the Social Security Act. Sentence four and sentence six of section 405(g) provide:

[4] The court shall have the power to enter, upon the pleadings and transcript of the record, a judgment affirming, modifying, or reversing the decision of the Secretary, with or without remanding the cause for a rehearing_
[6] The court may, on motion of the Secretary made for good cause shown before he files his answer, remand the case to the Secretary for further action by the Secretary, and it may at any time order additional evidence to be taken before the Secretary, but only upon a showing that there is new evidence which is material and that there is good cause for the failure to incorporate such evidence into the record in a prior proceeding; and the Secretary shall, after the case is remanded, and after hearing such additional evidence if. so ordered, modify or affirm his findings of fact or his decision, or both, and shall file with the court any such additional and modified findings of fact and decision, and a transcript of the additional record and testimony upon which his action in modifying or affirming was based.

42 U.S.C. § 405(g). The Melkonyan Court stated that sentence four and sentence six prescribe the only two kinds of remands allowed under section 405(g). Id. at 101-03, 111 S.Ct. at 2165. In a sentence-four remand, the court rules on whether the Secretary properly considered the claimant’s application for benefits. Under sentence six, by contrast, the court may remand without making a determination as to the “correctness of the Secretary’s decision.” Id. at 100, 111 S.Ct. at 2164. The point at which a party must apply for EAJA fees depends on which kind of remand the district court orders. If the district court enters a judgment reversing and remanding under sentence four, then the claimant must apply for fees within 30 days of the date that the judgment becomes final. If, however, the district court remands-under sentence six, the claimant cannot apply for fees until the completion of post-remand proceedings. Id. at 101-03, 111 S.Ct. at 2165.

While Melkonyan made clear that the claimant must apply for fees after the court enters a judgment remanding under sentence four, it did not explicitly state that the claimant becomes a “prevailing party” at the moment of remand rather than when he finally is awarded benefits. Schaefer clarified the confusion that divided the circuits following Melkonyan. See Gray v. Secretary of Health & Human Servs., 983 F.2d 954 (9th Cir.) (reaffirming pre-Melkonyan view that petitioner is prevailing party only after winning on the merits), vacated, 3 F.3d 1584 (1993); Luna v. United States Dep’t of Health & Human Servs., 948 F.2d 169, 172-73 (5th Cir.1991) (holding that sentence-four remand order triggers filing period). Schae-fer resolved the dispute by holding that an applicant for benefits becomes the prevailing party upon procuring a sentence-four remand for further administrative proceedings, regardless of whether he later succeeds in obtaining the requested benefits. — U.S. at —, 113 S.Ct. at 2631-32. In so holding, the Court rejected “dictum” to the contrary in Hudson. Schaefer, — U.S. at —, 113 S.Ct. at 2631.

Here, the decision as to when Flores became the prevailing party hinges on whether the district court’s remand was issued pursuant to sentence four or sentence six of section 405(g). Since Melkonyan was the first case to draw the sentence-four/sentence-six distinction, it is readily understandable that the district court, in an order entered prior to Melkonyan, did not explicitly state which type of remand was granted. Complicating matters is the fact that the district court’s order did not wholly conform to either model. In fact, the order appears to be “a hybrid: a sentence-four remand that the District Court had improperly (but without objection) treated like a sentence-six remand.” Schaefer, — U.S. at —, 113 S.Ct. at 2630 (describing the remand at issue in Hudson). In particular, at the time of remand the district court failed to enter a final judgment terminating its jurisdiction over the case, a central requirement of sentence-four remands. See id.

Nevertheless, the circumstances of this case make clear that the district court’s remand with instructions to consider the TEAM report was issued pursuant to sentence four. The district court reversed the Secretary’s decision because the Secretary incorrectly failed to consider all the evidence Flores had presented. The remand here was not a sentence-six remand. As the Court explained in Schaefer, sentence-six remands may be issued only in two situations: “where the Secretary requests a remand before answering the complaint, or where new, material evidence is adduced that was for good cause not presented before the agency.” Id. at —, 113 S.Ct. at 2629 n. 2. The district court’s remand clearly does not fall into either category. The Secretary made no request for remand,, and the vocational report that the ALJ failed to consider was not “new evidence;” it had been a part of the administrative record at Flores’ first hearing. Because the district court’s remand could only have been ordered pursuant to sentence four, Flores became the prevailing party at the time of remand.

As the prevailing party, Flores is entitled to attorney’s fees unless the Secretary shows that her position with respect to the issue on which the court based its remand was “substantially justified.” Because the remand was based on the failure of the ALJ to ask about or consider the TEAM report, the district court’s inquiry should have been directed to that procedural error and not to the question of ultimate disability. We will now analyze the “substantial justification” question ás it applies to that error.

C.

Although we direct our inquiry to the procedural issue that led to remand, we adhere to the basic test formulated in our cases preceding Melkonyan and Schaefer. In this circuit, we apply a reasonableness standard in determining whether the government’s position was substantially justified for purposes of the EAJA. Kali, 854 F.2d at 331. To show substantial justification for her position, the Secretary has the burden of establishing that her conduct had “a reasonable basis both in law and fact.” Pierce v. Underwood, 487 U.S. 552, 565, 108 S.Ct. 2541, 2550, 101 L.Ed.2d 490 (1988).

Applying our long-established test to the facts of Flores’ ease, we conclude that he is entitled to recover attorney’s fees for the district court proceeding that resulted in the remand of his claim to the administrative agency. The ALJ failed to consider the TEAM report, both in posing hypothetical questions to the vocational expert and in determining that Flores was not disabled. The Secretary’s decision to defend this error was not substantially justified.

Because Melkonyan and Schaefer changed the proper focus of the inquiry, there are few precedents that involve similar procedural or evidentiary questions. Previous Ninth Circuit cases assessing whether the claimant is entitled to recover attorney’s fees have based their decision on an evaluation of whether there was “some evidence” supporting the Secretary’s decision that the claimant was not disabled. See, e.g., Williams v. Bowen, 966 F.2d 1259, 1261 (9th Cir.1991). However, in Yang v. Shalala, 22 F.3d 213 (9th Cir.1994), an EAJA ease decided after Schae-fer, we held that the Secretary’s position was not “substantially justified,” where the ALJ had failed to give proper weight to evidence pertaining to the claimant’s age.

Here, the ALJ found Flores to be physically incapable of performing his past relevant work. The burden then shifted to the Secretary to prove the existence of other jobs that he could perform. The critical issue was whether he had the capacity to perform the “semiskilled sales work at a discount or hardware store” for which the ALJ found him qualified. All of these jobs require a higher level of mathematical ability than was possessed by Flores according to the TEAM report. See Dictionary of Occupational Titles 241-44; Villa v. Heckler, 797 F.2d 794 (9th Cir.1986) (finding Dictionary of Occupations Titles substantial evidence). However, the ALJ ignored the TEAM report both in posing questions to the vocational expert who testified at Flores’ administrative hearing and in his final decision. That was clearly error under our cases. E.g., Garner v. Secretary of Health and Human Services, 815 F.2d 1275, 1280 (9th Cir.1987). We have previously made it clear that, in meeting her burden of showing the claimant’s ability to work, the Secretary may only rely upon the vocational expert’s testimony if the questions posed by the ALJ include all of the claimant’s functional limitations, both physical and mental. Cooper v. Sullivan, 880 F.2d 1152, 1158 n. 13 (9th Cir.1989); Embrey v. Bowen, 849 F.2d 418, 422-23 (9th Cir.1988). We have made it equally clear that, in reaching her decision, the Secretary may not reject “significant probative evidence” without explanation. Vincent v. Heckler, 739 F.2d 1393, 1395 (9th Cir.1984) (quoting Cotter v. Harris, 642 F.2d 700, 706 (3d Cir.1981)). Specifically, under our case law, hypothetical questions must include facts such as those contained in the TEAM report and the ALJ’s written decision must state reasons for disregarding evidence of that nature.

In light of the importance of the vocational report to Flores’ claim of disability and the ALJ’s failure to ask about or consider that report, the Secretary’s decision to oppose Flores’ request for remand was not substantially justified. Accordingly, Flores is entitled to an award of attorney’s fees for the district court action in which the remand order was issued.

III.

We must also consider whether Flores is entitled to recover attorney’s fees for services rendered in administrative proceedings after the district court’s remand. Ordinarily, claimants whose eases are remanded under sentence four may not recover attorney’s fees for post-remand administrative proceedings. There is an exception to this general rule, however, where the district court fails to enter an order of final judgment upon remand and neither party challenges this omission. Because the district court in this case failed to enter an order of final judgment at the time of remand, and neither party objected, Flores is entitled to recover post-remand attorney’s fees.

In Sullivan v. Hudson, 490 U.S. 877, 109 S.Ct. 2248, 104 L.Ed.2d 941 (1989), the Supreme Court held that it is within the court’s discretion to award attorney’s fees for post-remand administrative proceedings where that representation is “necessary to the ef-fectuation of its mandate and to the ultimate vindication of the claimant’s rights.” Id. at 890, 109 S.Ct. at 2257. It further stated that, where the court orders remand but retains jurisdiction, “the proceedings on remand are an integral part of the ‘civil action’ for judicial review, and thus attorney’s fees for representation on remand are available subject to other limitations.” Id. at 892, 109 S.Ct. at 2258.

In Shalala v. Schaefer, — U.S. —, 113 S.Ct. 2625, 125 L.Ed.2d 239 (1993), the Court substantially limited the availability of post-remand fees, stating that Hudson’s holding was ordinarily inapplicable to sentence four remands. However, it specifically declined to overrule Hudson and carved out an exception for sentence-four remands in which the district court retains jurisdiction. Id. at —, 113 S.Ct. at 2630-31 & n. 4. Noting that Hudson itself involved a sentence-four remand, the Schaefer Court stated: “We ... do not consider the holding of Hudson binding as to' sentence-four remands that are ordered (as they should be) without retention of jurisdiction, or that are ordered with retention of jurisdiction that is challenged.” Id. at —, 113 S.Ct. at 2630-31. The Court apparently reconciled Hudson with Schaefer by requiring the continued payment of attorney’s fees in cases involving sentence-four remands in which the court incorrectly retains jurisdiction and this retention of jurisdiction goes unchallenged. Flores’ is precisely such a case.

Although Magistrate Judge Tassopulos remanded Flores’ case to the Secretary for further proceedings under sentence four, she did not enter an order of final judgment under Rule 58 terminating the district court’s jurisdiction over the case. See Schaefer, — U.S. at —, 113 S.Ct. at 2632; Yang v. Shalala, 22 F.3d 213, 216 (9th Cir.1994) (remand order is not separate document of final judgment under Rule 58). Neither Flores nor the Secretary challenged the district court’s retention of jurisdiction. Therefore, jurisdiction remained with the district court and Flores’ case falls within that narrow class of sentence four cases to which Hudson still applies. Under Hudson, the post-remand proceedings in this case are considered an essential part of the civil action, and attorney’s fees for Flores’ representation on remand are available, subject to the other limitations of the EAJA. Id. at 892, 109 S.Ct. at 2258.

IV.

The district court abused its discretion in denying attorney’s fees because it committed a material error of law in determining whether the Secretary’s position was substantially justified. The district court erroneously looked to the reasonableness of the Secretary’s position on the ultimate question of disability. Instead, it should, at least initially, have inquired whether the Secretary was substantially justified in her position with respect to the procedural errors that led to remand. See supra n. 5. When the proper question is examined, the Secretary’s error as to the fees issue becomes clear. Her position regarding the ALJ’s failure to ask about and consider the TEAM vocational evaluation was not substantially justified. On remand, the district court should determine the amount of fees to which Flores is entitled for the first district court case and for the post-remand administrative proceedings. Any request for fees arising from the second district court case must be brought in that second and separate action.

REVERSED and REMANDED. 
      
      . Donna Shalala was substituted for her predecessor in office, Louis W. Sullivan, pursuant to Federal Rule of Appellate Procedure 43(c)(1).
     
      
      . Claimants suffering from certain severe impairments, such as those listed in section 1.05(C), are automatically deemed disabled. Chavez v. Bowen, 844 F.2d 691, 693 (9th Cir.1988). Under Section 1.05(C), a claimant must establish that he has a spinal disorder with symptoms of "appropriate radicular distribution of significant motor loss with muscle weakness and' sensory and reflex loss.” 20 C.F.R. Part 404, Subpt. P, App. 1, § 1.05(C). The ALJ stated that Flores did not meet this requirement. If a claimant does not have one of the per se disabling impairments, then the Secretary must determine whether the claimant can perform either his past relevant work or some other type of work. 20 C.F.R. § 404.1520.
     
      
      . At the time of the district court decision denying fees, the second ALJ decision (which found Flores disabled until March 7, 1988 but not thereafter) was still pending before the Appeals Council. Thus, the decision denying fees did not consider the fact that the second ALJ decision was later reversed by the district court, which found not only that Flores was disabled but also that his disability was ongoing.
     
      
      . Although this appeal was filed before the. Schaefer decision, both parties were given the opportunity to submit supplemental briefs on the impact of that decision on Flores’ claim for attorney's fees.
     
      
      . Even if the Secretary’s position regarding the issue on which the court remanded were substantially justified, an award of attorney’s fees might he appropriate if the district court did not address all the issues raised by the plaintiff. It is for this reason that we say “at least initially” in the text. In some cases, a plaintiff may allege multiple errors on the part of the Secretary, only some of which are addressed by the district court. For example, the plaintiff might raise two separate claims of procedural error on appeal, and the district court might remand on the first without reaching the' second. If the Secretary’s position on the first claim were substantially justified, the question would arise whether the claimant would be entitled to attorney’s fees if the Secretary’s position on the second claim was not substantially justified. Because of the conclusion we reach supra, we need not decide that question here.
     
      
      .Section 2412(d)(1)(A) provides:
      Except as otherwise provided by statute, a court shall award to a prevailing party other tisan the United States fees and other expenses ... incurred by that party in any civil action (other than cases sounding in tort), including proceeds for judicial review of agency action, brought by or against the United States in any court having jurisdiction over that action, unless the court finds that the position of the United States was substantially justified or that special circumstances make an award unjust.
      28 U.S.C. § 2412(d)(1)(A).
     
      
      . For purposes of this discussion, it is irrelevant that Flores ultimately prevailed in district court in a later proceeding on his claim for the entire period.
     
      
      . As explained infra Part III, Schaefer upheld the holding in Hudson only with respect to (a) sentence-six remands and (b) sentence-four remands where the district court improperly but without objection retains jurisdiction. Schaefer, — U.S. at — & n. 6, 113 S.Ct. at 2631-32 & n. 6.
     
      
      . The view that the remand in this case was a sentence-four remand finds support in Schaefer's discussion of Hudson. As in Hudson, the district court here remanded because of the Secretary’s failure to consider the evidence properly. And, as in Hudson, the district court here failed to enter a final judgment terminating jurisdiction. For this reason, the Schaefer Court concluded that Hudson was a sentence-four remand. — U.S. at —, 113 S.Ct. at 2630.
     
      
      . Despite the fact that Melkonyan and Schaefer were issued after the district court's decision denying fees, the rule we establish today must be applied to Flores’ case. Our decision in Holt v. Shalala, 35 F.3d 376 (9th Cir.1994), concerning the period during which a prevailing party must file for attorney's fees, is not to the contrary. In Holt, we concluded that the holding in Schaefer could not be applied retroactively to bar the claims of those who filed their motion for fees at the conclusion of post-remand proceedings, because it would be inequitable to’ do so. We reasoned that such a retroactive application of Schaefer would penalize plaintiffs who had reasonably relied on the previous rule regarding filing deadlines. Id. 35 F.3d at 380-81. No such inequities attend the application of the rule we apply today. It is hardly inequitable to award attorney’s fees where the Secretary commits procedural errors that are not "substantially justified.” We merely compel the Secretary to abide by her obligation to consider the evidence properly before denying a claim for disability evidence. In addition, awarding fees where the Secretary’s litigation position is not "substantially justified” ensures that attorneys will receive fair compensation for their defense of claimants' procedural rights.
     
      
      . Previously, we have said that, to meet her burden, the Secretary must show that her conduct was reasonable "at each stage of the proceedings.” Williams v. Bowen, 966 F.2d 1259 (9th Cir.1991); Kali v. Bowen, 854 F.2d at 332. In Kali, we stated that in order to avoid a fee award the government must demonstrate the reasonableness of both its original action at the administrative level and its decision to defend that action in court. Kali, 854 F.2d at 332. However, as the Kali court noted, the inquiry into the government’s litigation position will ordinarily encompass the inquiry into the administrative decision. Id. It is difficult to imagine any circumstance in which the government’s decision to defend its actions in court would be substantially justified, but the underlying administrative decision would not. Thus, it would seem that we need only look to the Secretary's decision to defend her action in the judicial proceeding. In any event, in Flores' case, we can resolve his entitlement to fees by looking to the reasonableness of the Secretary’s litigation position in the district court. We need not consider whether, after Melkonyan and Schaefer, it would ever be necessary to look beyond that question.
     
      
      . In ruling on post-Mellconyan EAJA petitions, lower courts have found that the government's position was not substantially justified when the ALJ failed to set forth specific, legitimate reasons supporting an adverse credibility determination. Afanador v. Sullivan, 809 F.Supp. 61, 64-65 (N.D.Cal.1992); Sesker v. Sullivan, 779 F.Supp. 1042, 1045 (W.D.Mo.1991); Sorich v. Shalala, 838 F.Supp. 1354 (D.Neb.1993). Likewise, the Secretary's decision has been deemed unreasonable where the ALJ undervalued favorable evidence and pressured an expert witness to reach contradictory conclusions. Spurlock v. Sullivan, 790 F.Supp. 979, 981 (N.D.Cal.1992). One district court found that the Secretary's position was not substantially justified, where the ALJ failed to consider the combined effect of the plaintiff’s impairments, and to incorporate all the claimant's impairments in questions to the vocational expert. Stewart v. Sullivan, 810 F.Supp. 1102, 1106 (D.Haw.1993).
     
      
      . Schaefer itself presented a similar procedural history. The district court in Schaefer never entered a separate document of final judgment in accordance Rule 58. Consequently, the Court determined that the thirty-day period for requesting EAJA fees had never begun. Id. at —, 113 S.Ct. at 2632.
     
      
      . In Curtis v. Shalala, 12 F.3d 97, 101 (7th Cir.1993), the Seventh Circuit concluded that attorney's fees are not available for administrative proceedings subsequent to a sentence-four remand, even where the district court fails to enter a separate order of judgment after remanding. We find the Seventh Circuit’s reasoning unpersuasive. Under the decision in Curtis, a sentence-four remand order automatically terminates jurisdiction. 12 F.3d at 101. Thus, fees are never available for administrative proceedings following a sentence-four remand. Id. In so holding, Curtis fails to address the language from Schaefer making clear that fees are available in sentence-four cases where the district court improperly but without objection retains jurisdiction. Schaefer, — U.S. at — —, 113 S.Ct. at 2630-31.
      The Seventh Circuit's decision is thus inconsistent with Schaefer. As the Secretary acknowledges, post-remand fees are still available in some sentence-four cases. In her petition for rehearing, the Secretary states: “The panel [in this case] also properly observed that the Court in Schaefer stated that Hudson fees continue to be available 'in cases involving sentence four remands in which the district court incorrectly retains jurisdiction and this retention of jurisdiction goes unchallenged.' " The Secretary nevertheless contends that the Hudson rule applies to sentence-four cases only where the district court “expressly” retains jurisdiction. Because Schae-fer does not limit the availability of post-remand fees to cases in which the retention of jurisdiction is express, and because we are not persuaded of any reason for adopting such a limitation, we reject the Secretary's contention. However, we note that even under the Secretary's interpretation of Schaefer, the reasoning in Curtis cannot be correct, since Curtis would prohibit post-remand fees in all sentence-four cases.
     
      
      . Flores is not entitled to recover attorney’s fees for the second district court proceeding in this action. In the second case — the challenge to the AU’s finding on remand that Flores was disabled only for a limited or “closed” period — the district court again reversed the Secretary's decision, and found Flores entitled to ongoing benefits. Under Schaefer, Flores became a "prevailing party” for a second time when Magistrate Judge Edwards reversed in part the second ALJ decision. Flores was therefore entitled to file another motion for attorney's fees within 30 days of that final judgment, but was required to do so in the second district court proceeding.
     