Congressional hawks prevailed at a House-Senate conference yesterday as they swept away restrictions on nerve gas production and the MX missile in writing the compromise defense authorization bill for fiscal 1983.

The House had voted to forbid nerve gas production, while the Senate had cut MX funds. Both restrictions were dropped in favor of President Reagan's positions.

In another victory for Reagan and the Pentagon, the conference wiped out a House-passed provision to deny money for defense programs that would undercut existing arms control agreeements.

The amendment might have stopped the Pentagon from deploying MX missiles close together in the "Dense Pack" pattern.

Those major decisions were reached as the conference of senior members of the House and Senate Armed Services committees was well on its way to approving about $177 billion for the development and production of weapons in fiscal year 1983.

Still being debated last night was whether to direct the Air Force to buy the Lockheed C5 or the Boeing 747, or a mix of both, as its new long-distance transport plane.

Other remaining questions include whether the full House and Senate will accept the changes made in the defense bill, as is usually the case, and how much of the money authorized will be appropriated by Congress.

The authorization bill sets ceilings on how much money the Pentagon can obligate for various weapons programs in a given year. Separate appropriations legislation determines how much of the money that is authorized the Pentagon will receive.

Nerve gas production is the most emotional of the issues in the defense authorization bill. The administration contends that modernizing the nation's chemical arsenal by resuming nerve gas production is the best way to deter the Soviets from using nerve gas. Opponents counter that the United States has plenty of nerve gas stored for deterrence purposes and producing more would heat up the arms race.

The Senate, voting 49 to 45, rejected an amendment that would have denied the $54 million the administration requested for nerve gas production. The House came down the opposite way, voting 251 to 159 against production. The House amendment was offered by Chairman Clement J. Zablocki (D-Wis.) of the House Foreign Affairs Committee.

As with many other programs within the Pentagon authorization bill, the nerve gas question will be argued and voted anew during the appropriations process now under way. The House Appropriations Committee on Wednesday denied $18.3 million that the administration had requested to build a nerve gas factory in Pine Bluff, Ark.

On the MX, the Senate had held back $1.5 billion Reagan requested to produce the first nine missiles and deleted $715 million requested to study temporary homes for the MX. The administration had said it believed those first missiles would be put into existing Minuteman silos, but added that other basing schemes were still being explored. The Senate agreed that the money should be withheld until the president decided where he wants to put the missile.

The House beat back amendments to slash the administration's MX request, including the money for producing the first nine missiles. The House MX position, with what sources called relatively minor modifications, prevailed in the conference.

A related issue is how much money the administration should receive to accelerate development of anti-ballistic missiles that might be employed to protect MX silos.

Defense Secretary Caspar W. Weinberger had appealed to the conference to restore the $468 million the House cut from the Army's request of $727.3 million for anti-ballistic-missile research. The House Armed Services Committee had argued that it did not make sense to approve $468 million for what is known as LOADS, low altitude defense system, until Reagan had made up his mind where to put the MX and how to protect it. The Army is considering LOADS for the MX.