WASHINGTON — A House-Senate conference committee Thursday night approved a compromise military budget that congressional aides said would restore money for all the 22 weapons systems that either the House or Senate had voted to kill.

The $302.5 billion military programs bill, which increases spending ceilings to make up for inflation, assures that none of the weapons programs the Pentagon requested will be eliminated next year.

One aide said the bill for the 1986 fiscal year ''proved once again that Congress can't kill weapons systems any more than the Pentagon can.''

Instead of cutting weapons programs, the conferees managed to cut about $20 billion from the Pentagon's budget request by slowing the pace of the production of some weapons, estimating lower costs for others, forecasting lower inflation and better dividends from foreign currency exchanges, and trimming personnel and operating costs.

The bill would meet the target figure the conferees agreed upon two weeks ago for the Pentagon budget. But in later years, said a Senate aide, the large number of growing weapons programs would make military spending and the deficit more difficult to control.

In one major saving on the military budget, congressional aides said the conferees had agreed to cut $2.9 billion from the military retirement system and to order the Pentagon to come up with proposals for making military pensions less expensive.

The Pentagon requested $18 billion for its annual contribution to the trust fund that pays military retirees. Critics have said the system, which allows men and women in uniform to retire after 20 years at half pay, is too expensive and encourages talented people to leave the service.

The conference bill also granted Pentagon requests to proceed with at least four major new programs. The total cost of the four, including research on the Stealth bomber and fighter, was estimated by one aide at $150 billion to $200 billion over the life of the programs.

The conferees Thursday night broke a deadlock and approved a provision restricting Pentagon employees from taking jobs with military contractors whose projects they have overseen. Aides said they expected the House and Senate to vote on the conference agreement sometime next week.

Aides said the bill may face strong opposition in the House from members unhappy with the conferees' decision to drop some House-passed restrictions on production of new chemical weapons. Other controversial provisions in the conference agreement include permission for the Air Force to test a new anti- satellite weapon, an agreement to spend $2.6 billion on the MX missile program, and a $2.75 billion research budget for President Reagan's space- based anti-missile program.

Some members of Congress have complained for years that both Congress and the Pentagon respond to requests to cut costs by slowing programs down

rather than eliminating those of lower priority.

A result, they say, is that the budget is crowded with weapons produced at inefficient rates, and ultimately the weapons systems cost more to produce.

The House, in approving its version of the military programs bill last month, voted to eliminate 20 weapons programs it considered marginal.

They included the technically troubled Advanced Medium Range Air-to-Air Missile, or Amraam; the E-61, an expensive new communications relay plane for the Navy; and Jstars, a new airborne, tank-hunting radar that House members said was too vulnerable to enemy attack. In most cases, the House said the military could make do with existing weapons or should shop for a better alternative.

The Senate in its bill voted to eliminate two programs -- a 9mm Italian- made pistol to be used as the new sidearm of all the military services, and a new Navy helicopter, the Seasprite, to be used in tracking and attacking submarines. Senators said the gun was an inadequate replacement for the old .45-caliber Colt pistol, and that the helicopter was not enough of an improvement over an existing version.

Aides said that as of Thursday morning, the conferees had restored money to finance all those programs. In most cases, they said, the weapons were restored after strong pleas from the military.

Some of the programs were restored with conditions governing their cost and performance.

''The problem is, when you look at these things case by case, they all have some merit,'' one congressional aide said. ''Nobody's willing to look at the whole picture and say this is a higher priority and this is a lower priority.''