
734 N.E.2d 935 (2000)
315 Ill. App.3d 568
248 Ill.Dec. 644
The PEOPLE of the State of Illinois, Plaintiff-Appellee,
v.
William PONYI, Defendant-Appellant.
No. 1-97-1256.
Appellate Court of Illinois, First District, Sixth Division.
July 28, 2000.
*936 Jean T. McGuire, Assistant State's Attorney, State's Attorney Office of Cook County, Chicago, for Appellee.
Yasemin Eken, Assistant Appellate Defender, Office of the State Appellate Defender, Chicago, for, Appellant.
Justice BUCKLEY delivered the opinion of the court:
Defendant William Ponyi appeals from the trial court's dismissal of his pro se *937 petition for postconviction relief. The issues on appeal are: (1) whether the trial court's determination of whether the pro se postconviction petition was frivolous or without merit was tainted by a discussion that took place between the trial judge and the assistant State's Attorney; (2) whether defendant raised the gist of a meritorious claim that his right to the effective assistance of counsel was denied based on his allegation that defense counsel failed to explain the plea bargain process; and (3) whether defendant raised the gist of a meritorious claim that his right to the effective assistance of counsel was denied when trial counsel failed to request a fitness hearing pursuant to section 104-21(a) of the Code of Criminal Procedure of 1963 (725 ILCS 5/104-21(a)(West 1994)). For the reasons that follow, we reverse and remand for the appointment of an attorney.

STATEMENT OF FACTS
On January 28, 1994, after a jury trial, defendant was convicted of possession of a controlled substance and possession of a controlled substance with intent to deliver. He was sentenced on April 22, 1994, to 21 years in the Illinois Department of Corrections. His conviction and sentence were affirmed on direct appeal on June 10, 1996. People v. Ponyi, 281 Ill.App.3d 1131, 233 Ill.Dec. 771, 701 N.E.2d 836,(1996) (unpublished order pursuant to Supreme Court Rule 23).
On January 2, 1997, defendant filed a pro se petition for postconviction relief. Defendant alleged in the petition that his right to the effective assistance of counsel was denied when his trial counsel failed to inform him of the nature of a plea offer made by the State or to adequately explain the plea. Defendant also alleged that his right to the effective assistance of counsel was denied when his trial counsel failed to inform the trial court that he was on psychotropic drugs at the time of his sentencing hearing. Defendant also alleged that he was denied his right to due process of law when he was denied his right to a fitness hearing pursuant to section 104-21(a) (725 ILCS 5/104-21(a)(West 1994)). Attached to the petition were defendant's affidavit, a prison law clerk's affidavit, and a letter requesting defendant's medical records from Cermak Health Services. On February 27, 1997, the trial court dismissed defendant's petition as frivolous and without merit.
After filing his brief on appeal from the dismissal of the postconviction petition, defendant filed a motion to supplement the record with the medical records he received from Cermak Health Services covering the time period of January 28, 1994, to April 6, 1994. The medical records from Cermak Health Services and the medication log sheets from the residential treatment unit indicated that Desipramine was administered to defendant from March 8 through March 31. Although the medication log sheets for the month of April were not included with the records, a prescription, dated April 11, 1994, was included, and it ordered Desipramine to continue with 50 milligrams in the morning and 100 milligrams at night. On August 12, 1998, this court granted defendant's motion to supplement the record on appeal with the medical records and remanded the matter to the trial court "for its consideration of the medical records and a reconsideration of its previous order."
On May 21, 1999, the trial court held the remand hearing. Harry Semrow, an assistant State's Attorney, appeared on behalf of the State. Defendant was not represented by an attorney. At the hearing, the trial court asked the State several questions about the law and the facts:
"THE COURT: Okay Mr. Semrow, what is the current fitness standard? What does that provide?
MR. SEMROW: Well, currently it provides there must be, absent the showing, before the Court, that the Defendant is not entitled to a fitness hearing. However, at the time that this offense occurred, the law provided that the Defendant would be entitled to a *938 fitness hearing in the event that approximate to the, uh
THE COURT: Date of sentencing.
MR. SEMROW: Well, approximate to the crucial period of time
THE COURT: Either the trial or the date of sentencing.
MR. SEMROW: Yes. That he had ingested some psychotropic medications. It was, therefore, in this instance, and I believe the Court had an opportunity to review the records and to make a determination whether or not in this Court's judgment psychotropic medications were ingested at the times approximate, uh
THE COURT: Prior to sentencing.
MR. SEMROW: Prior to sentencing.
* * *
THE COURT: So the question we have before us is whether he was administered medication prior toimmediately prior to the sentencing hearing which could have certainly affected his right to cooperate with Counsel and assist in his defense as to the issue of sentencing. Is that correct?
MR. SEMROW: Yes. I believe the remand of the Appellate Court was to have this Court review the medical records and the drug ingestion records that were submitted.
THE COURT: Didn't I review them once already?
MR. SEMROW: Judge, they were not presented to this Court when the post-conviction petition was presented. This Court initially dismissed this matter as being frivolous and blatantly without merit because the allegations were totally unsupported. It was upon the appeal to the Appellate Court that the Appellate Court Counsel, I must surmise, got the Petitioner to waive his rights to confidentiality and acquire those medical records and presented them to the Appellate Court. The Appellate Court then looked at those records and sent them back to this Court saying given these medical records would this change your conclusion as to whether or not this individual was denied his right to a fitness hearing because of ingestion of psychotropic medications approximate to the time of the sentencing.
THE COURT: People versus Kincade stands on the issue, does it not, how any observation this Court observed during his sentencing, that is essentially irrelevant. Is that correct?
MR. SEMROW: That would be irrelevant due to the fact that if he were ingesting psychotropic medications at that time, pursuant to the statute, and I don't remember the section offhand, but pursuant to the statute, the individual was ingesting drugs approximate to that time. He was entitled by virtue of that fact and that fact alone to a fitness hearing. And the determination then, therefore, would be whether or not he ingested drugs approximate to
THE COURT: Correct me if I'm wrong. The records show that Mellaril and Sinequan were administered February 3 and March 27.
MR. SEMROW: I believe that's accurate, Judge.
THE COURT: And Desipramine was administered March 7 and April 7. And he was sentenced 4-22. So there's a fifteen day span, is there not?
MR. SEMROW: By my calculations that's accurate.
THE COURT: Well, it's this Court's conclusion that a fifteen day period, and certainly, it does not appear that he was overdosed, that he was provided in this in those medical quantities on those dates, a 15 day period would certainly be a sufficient period, this Court finds, to dissipate any effect that it would have in him."
Thereafter, the trial judge ruled that the original dismissal order would stand and requested that the assistant State's Attorney prepare something for his signature.
*939 Defendant filed a supplemental brief addressing the trial court's decision on limited remand.

DISCUSSION

A. STANDARD OF REVIEW
The Post-Conviction Hearing Act (the Act) (725 ILCS 5/122-1 et seq. (West 1994)) provides a remedy to criminal defendants who claim that a substantial violation of their federal or state constitutional rights occurred in their trial or sentencing hearing. See People v. Towns, 182 Ill.2d 491, 502, 231 Ill.Dec. 557, 696 N.E.2d 1128 (1998). The scope of a post-conviction proceeding, which is a collateral attack on a prior conviction and sentence, is limited to inquiry into constitutional issues involved in the conviction and sentence that have not been, and could not have been, adjudicated previously on direct appeal. See Towns, 182 Ill.2d at 502, 231 Ill.Dec. 557, 696 N.E.2d 1128.
An evidentiary hearing on the petition is required only when the allegations of the petition, supported by the trial record and the accompanying affidavits, make a substantial showing of a violation of a constitutional right. See People v. Hobley, 182 Ill.2d 404, 428, 231 Ill.Dec. 321, 696 N.E.2d 313 (1998). For the purpose of determining whether to grant an evidentiary hearing, all well-pleaded facts in the petition and in the supporting affidavits are to be taken as true. See Towns, 182 Ill.2d at 503, 231 Ill.Dec. 557, 696 N.E.2d 1128. If the circuit court determines that the petition should be dismissed without an evidentiary hearing, its judgment is subject to de novo review. See People v. Coleman, 183 Ill.2d 366, 388-89, 233 Ill.Dec. 789, 701 N.E.2d 1063 (1998).

B. INPUT FROM STATE DURING PROCEEDING
In its supplemental brief addressing issues raised at the hearing on limited remand, defendant contends that the State's input at the remand hearing "tainted the circuit court's independent evaluation" of the petition and, thus, the court's denial of the petition should be reversed.
Under the Act, a postconviction proceeding that does not involve the death penalty has three distinct stages. 725 ILCS 5/122-2.1 (West 1994). In the first stage, the defendant files a petition and the circuit court must, within 90 days, determine whether it is frivolous or patently without merit. 725 ILCS 5/122-2.1(a)(2)(West 1994). In this first stage, the Act does not permit any further pleadings from the State. "Instead, the circuit court considers the petition independently, without any input from either side." People v. Gaultney, 174 Ill.2d 410, 418, 221 Ill.Dec. 195, 675 N.E.2d 102 (1996). If the petition is not dismissed after the first stage, it advances to the second stage for the appointment of counsel. 725 ILCS 5/122-4 (West 1994). In the second stage, the State may file a motion to dismiss or answer the petition. 725 ILCS 5/122-5 (West 1994). If the circuit court does not dismiss or deny the petition in the second stage, the proceeding advances to the final stage where the circuit court conducts an evidentiary hearing. 725 ILCS 5/122-6 (West 1994).
As noted in Gaultney, although the Act specifically contemplates that the State may file a motion to dismiss or answer only after the trial court has made its "first stage" independent evaluation of the petition to determine if it is frivolous, the mere premature filing of a motion or responsive pleading in the first stage does not per se contaminate the circuit court's determination of frivolousness. See Gaultney, 174 Ill.2d at 418-19, 221 Ill.Dec. 195, 675 N.E.2d 102. This is because such a premature filing does not necessarily prevent the judge from conducting an independent evaluation. See Gaultney, 174 Ill.2d at 419, 221 Ill.Dec. 195, 675 N.E.2d 102 However, "reversal is required where the record shows that the circuit court sought or relied on input from the State when determining whether the petition is frivolous." Gaultney, 174 Ill.2d at 419, 221 *940 Ill.Dec. 195, 675 N.E.2d 102 and cases cited therein.
Here, the trial court clearly relied on the State's input when it reconsidered defendant's petition and denied it. The court sought input from the State when it asked the State about the current fitness standard. The court also questioned the State about the contents of defendant's medical records. The State represented to the court that the last time the defendant received medication was on April 7. However, as pointed out in defendant's brief on appeal, the medical records also contained a prescription dated April 11, 1994, and it ordered Desipramine to continue with 50 milligrams in the morning and 100 milligrams at night. Thus, the record suggests that defendant was taking medication beyond the April 7 date. Had the judge independently reviewed the record, he may have realized that fact. Instead, the judge relied on the State's concurrence that defendant last received medication on April 7. Therefore, we find that the circuit court's ruling was improperly tainted by the State's input.

CONCLUSION
Accordingly, the circuit court's order dismissing defendant's petition is hereby reversed and the cause is remanded for further proceedings consistent with sections 122-4 through 122-6 of the Act. Consequently, we need not reach defendant's arguments related to the merits of his petition.
Reversed and Remanded.
ZWICK, P.J., and CAMPBELL, J., concur.
