Defense Secretary Caspar W. Weinberger, in an unusual letter to the troops, has pledged that no active or retired military personnel will face cuts in their pension benefits.

The letter, dated Sept. 6 and released yesterday, notes that the Pentagon will have to accede to a proposed congressional mandate to reduce the budget for pensions -- a directive Weinberger has strenuously opposed as discouraging to military careers.

If the budget cuts are approved, Weinberger said, they would "affect future entrants only. I want to emphasize to you again, in the strongest terms, that the dedicated men and women serving, and those who have retired before them, will be fully protected in any options we are required to submit to the Congress."

Pentagon spokesman Fred S. Hoffman said the recent debate over military pension sends a "noticeable wave of concern through the ranks," and Weinberger was concerned it might have a "negative effect" on reenlistment.

Of Weinberger's letter, Hoffman said "It is a message of reassurance."

Reenlistment rates for the Army, Navy and Air Force have shown little change or actually improved in recent months, according to spokesmen for the three services.

Exit interviews with Army and Air Force personnel show that retirement benefit complaints rarely come up, spokesmen said. In the Navy, however, pension uncertainties have recently led the list of concerns among those leaving the service, a spokesman said.

Retirees are entitled to half of their base pay after 20 years of service, and Weinberger said the Pentagon will "honor the absolute commitments."

A House-Senate compromise on the defense budget for fiscal 1986 cuts $2.9 billion from the $18.2 billion requested for military retirement benefits. The Pentagon was directed to change the retirement system to accommodate the smaller budget.

The conference report was approved by the Senate and awaits action in the House.