A massive anti-drug bill set for a final vote Friday with Congress eager to adjourn would create a Cabinet-level oversight official, a federal death penalty for major dealers and stiff fines for even casual users.

"When we finish this bill, we will go home," House Speaker Jim Wright pledged late Thursday night upon announcing that a marathon bargaining session finally resolved the thorny issues delaying a final vote.Wright did not rule out the possibility of a vote early Friday on technical corrections to the 1986 tax reform bill, but the anti-drug bill clearly was the last major legislative hurdle of the 100th Congress.

As negotiators struggled to reach their accord on the sensitive election-year measure, Congress gave final approval Thursday to a $1.3 billion homeless aid package and a bill that provides cost-of-living increases for veterans.

The negotiated version of the drug legislation, expected to win overwhelming approval in both chambers, also retained the support of President Reagan by including most of the provisions he termed necessary to fight the escalating narcotics problem.

To reach a compromise between original House and Senate versions, however, negotiators had to scale back many of the most sweeping provisions, had to drop some measures unrelated to the matter and had to restore a few others.

The final package would permit the execution of drug kingpins and major traffickers who commit narcotics-related murder and would hit users with fines as large as $10,000 for possession of even small amounts of illegal drugs.

It also would establish the Cabinet-level "drug czar" to coordinate the nation's narcotics policy by developing a strategy to fight both the supply and demand side of the problem within 180 days of taking office.

Negotiators delayed implementation of a second get-tough provision favored by Reagan involving the cut-off of federal benefits, such as student loans and mortgages, to those convicted of any drug offense.

The delay in loss of federal benefits until Sept. 1, 1989, would give the new president time to make a decision on which federal programs should be affected by the provision and would allow Congress to fine-tune the measure.

Negotiators also agreed to drop a Senate provision that would have required random drug testing of transportation workers in safety-sensitive positions but restored another measure that had been scrapped.

Faced with the threat of a floor fight, the bargainers reversed their position on weakening a child pornography amendment.