Counsel may be ineffective for failing to file a notice of appeal even where the defendant expressly waived his right to appeal as part of a plea agreement. The defendant here waived his right to appeal, but a year later filed a habeas petition alleging that he had asked his attorney to file a notice of appeal and the attorney had refused to do so. The district court declined to hold an evidentiary hearing, but the Ninth Circuit remanded. The determination of whether counsel is ineffective for failing to file a notice of appeal involves a multilayered inquiry. First, the court must determine whether counsel consulted with appellant about an appeal, and second, whether a failure to so consult was reasonable. In answering the latter question, the court should determine whether a rational defendant would want to appeal, or whether this particular defendant in fact expressed his interest in appealing. In the instant case, the appellate waiver would answer the question of whether a rational defendant would wish to appeal, but if the defendant in fact requested that his attorney file an appeal, habeas relief should be available regardless of whether a rational defendant would have wished to appeal. Thus the court remanded the matter for factual findings.