The Carter administration is considering precedent-setting legislation to allow American and Panamanian employes of the U.S. government in the Canal Zone to retire on full pensions after only 20 years' service.

Part of the package, now under review by the Office of Management and Budget, also would give those workers much more generous pensions. It would allow them to base their annuities on their highest yearly salary. Most federal workers now have pensions set on the basis of the average of their highest three-years' pay.

If adopted by Congress (the Senate, of course, has already approved the canal treaty) the new retirment breaks would certainly bring demands from other federal workers for more liberal pension breaks. Employes facing loss of jobs because of cutbackes or reorganizations would want similar treatment.

The liberalized retirement is part of a package designed to help out about 5,000 of the 15,000-plus U.S. government employes in the zone who work for Defense, the Canal Company and government, F.A.A. and other agencies. It also includes a tough new job placement proposal, due for release next month. It would give those Canal Zone workers priority for U.S. job placements, even over U.S.-based civil servants facing RIFs (reductions-in-force).

The earliest point at which most federal workers now can retire on immediate pension is at age 55 with 20 years of service. There are special programs for law enforcement personnel and workers engaged in hazardous jobs who can quit at age 50. But even in most of those cases, the employe must be facing a RIF situation. And he must take a pension cut for each year he is under age 55. And his annuity is based on the high-three-year formula.

Special retirement benefits for Canal Zone workers must be cleared by Congress if the White House decides to submit them. They could run into trouble in the House (where there was strong opposition to turning the canal over to Panama) on grounds that it would cause other federal workers to clamor for equal treatment.

The program of priority job placements for zone employes would knock some displaced U.S. federal workers out of their first choices for other jobs. It could be set in motion next month by the Civil Serivce Commission.

Under the priority placement for Canal Zone workers, they would be able to put in bids for jobs in any two (of 10) U.S. regions, and specify the minimum grade they would take. If they bid for a job that another displaced worker in the U.S. wanted, they would have first crack at it.

The turnover of functions in the Canal Zone - a 10-mile wide, 50-mile long U.S. territory enclosed by Panama - begins in October 1979. Eventually, most American employes there - U.S. citizens and foreign nations - will be put out of work.

The Canal Company has 2,208 workers, the Panama government 1,631; Air Force 191; Army 837; Navy 101; FAA 129 and the Smithsonian Institution, 24. Another 10,000 employes, most of them Panamanians, are supposed to be guaranteed continued jobs rights - including pay and fringe benefits - by the Panamaian government when it assumes control.

U.S. officials estimate about 5,000 American and Panamanian employes of the U.S. government will benefit from the early retirement and/or priority placement.