A bill that would overhaul Virginia's involuntary commitment system cleared a major hurdle today when it won unexpected approval from the Senate Education and Health Committee.

Last year, by a tie vote, the committee killed a bill that would have reformed the commitment law after it had passed the House. Today, by an 8 to 6 margin, the committee approved a revised version of the bill, which would provide greater legal safeguards and improved medical screening for the 4,000 persons in Virginia who are annually sent to state mental hospitals against their will.

"I'm stunned," said the bill's sponsor Del. Warren G. Stambaugh (D-Arlington) after the vote. "I've been here 12 years and I still can't figure out how this place works. I thought this bill was dead."

The bill's passage apparently hinged on a controversial amendment Stambaugh added earlier this week. The amendment, establishing a process similar to parole in criminal cases, would allow a mental hospital to "provisionally discharge" a person who agrees in writing to comply with outpatient treatment and medication.

Noncompliance could empower a judge to order a person's "immediate apprehension" and return to a state mental hospital without a hearing or appeal.

Stambaugh said he agreed to the amendment at the request of a group of relatives of the chronically mentally ill who have consistently opposed his bills to revamp the commitment process. An official of the Virginia chapter of the American Civil Liberties Union, which had supported Stambaugh's bill, said he has "serious problems" with the amendment.

"The concept makes a lot of sense but the way they've implemented it has a lot of problems," said Leonard S. Rubenstein, vice president of the Virginia ACLU. "We would like to see some significant changes made."

"The idea is that when there's a dispute about treatment all a mental health official has to do is tell a judge and the person can be taken away with no hearing and no appeal. That is more stringent than what commitment permits in the first place."

The Senate is expected to consider the 39-page bill early next week. If the bill is approved, it will go to a joint House-Senate conference committee, where differences between this year's bill and last year's would be resolved, and then back to each chamber for approval.

The bill approved today would double the present $3 million Virginia gives local jurisdictions to operate commitment systems. It would not become effective until July 1986, a compromise Stambaugh said may have helped persuade Senate Majority Leader Hunter B. Andrews (D-Hampton) and committee chairman Stanley C. Walker (D-Norfolk) to change their votes. Last year both voted to kill the bill. Today they voted for it.

The presidents of both the Northern Virginia Psychiatric Society and Pathways to Independence, a group composed of 300 Northern Virginia families of the chronically mentally ill, said they were disappointed the bill narrowed rather than broadened commitment criteria. Both said their organizations would not "actively oppose" the measure in its present form.

The 150-member Psychiatric Society and Pathways had opposed two changes in commitment criteria: that dangerousness be substantiated by a "recent overt act" and that a person "substantially unable to care for oneself" -- the category under which most are committed -- be demonstrated by an inability to provide "provide food, shelter" or for personal safety.

The bill would also consolidate responsibility for commitments in local Community Services Boards, which oversee the mental health systems. It would require both a prescreening and an independent psychiatric evaluation before a commitment hearing, make mental health training for judges and lawyers mandatory and increase from $50 to $75 the fee paid attorneys and judges in commitment cases.

A 1984 Washington Post series focusing on the Fairfax County commitment system, considered one of the best in the state, found that people were sometimes committed for up to six months after court hearings as brief as three minutes by part-time judges with no mental health training. Legal representation was often minimal.