As the Iran-contra hearings alternate between mind-numbing detail and star performances, the central issue of the balance between the executive branch and Congress is in danger of being neglected.

The conventional wisdom that modern-day presidents and their agents in the executive branch have a tendency to break laws is too simple and too self-denigrating. The overwhelming majority of public officials endure the pressures and harassments of official life because they want to make a contribution to a better world.

The real issue is not whether officials are entitled to substitute their judgment for that of Congress -- not even the most zealous White House staffer would claim that -- but whether our system of checks and balances is moving excessively toward the former with ever less concern for balance between the coequal branches of government. Nearly insoluble constitutional and personal dilemmas arise when each branch of the government acts on the premise that the other is producing disaster and must be thwarted at all costs.

There were serious errors of judgment in the Iran-contra affair, ranging from the decision to ransom hostages with arms to the arming of a country whose victory would imperil the interests of the industrial democracies, to pursuing covert policies totally contradictory to publicly stated positions. But these do not amount to a crisis of institutions.

These arise when each branch of government pushes its prerogatives to the limit, destroying the self-restraint without which the system cannot work. The conduct and funding of contra operations clearly fall into this category.

On the formal level the case is obvious. The executive branch cannot be allowed -- on any claim of national security -- to circumvent the congressional prerogative over appropriations by raising its own funds through the sale of government property. But equally, Congress has an obligation to put forward a clear-cut expression of what it desires. And both branches must seek to settle controversial issues not by legalisms and subterfuges but by a serious national debate setting forth premises, opportunities and risks. This is emphatically not what has happened.

The administration is of the view -- which I share -- that Sandinista rule in its current form is a long-term threat to the stability of Central America and hence to the security of the United States. It has therefore sought to bring pressure on the Sandinista regime, either to induce it to become more democratic or, failing that, to overthrow it (though that latter objective has never been made explicit). The administration considers the contras a key element of a new political structure in Nicaragua.

The reaction of Congress has been ambivalent. The Vietnam-born reluctance to be drawn into a conflict in Nicaragua has been matched by a hesitation to assume the blame for a collapse of the Nicaraguan anticommunist resistance.

The result has been a series of compromises, which is the way Congress decides on legislation. This process in foreign policy tends to combine the disadvantages of all policy choices. Thus the impression created by the Iran-contra hearings that the administration violated a clear-cut congressional mandate is misleading, for the mandate has been anything but clear-cut.

There have been at least six different versions of legislation affecting contra aid, each of them authorizing support for the contras but encumbering that aid with restrictions that varied from year to year and that largely contradicted congressional consent to the principle of support for the Nicaraguan resistance.

From Dec. 21, 1982, to Dec. 7, 1983, there was a prohibition against using funds to ''overthrow'' the Nicaraguan government; by implication other contra activities were permitted if not encouraged, and the term ''overthrow'' was never defined.

From Dec. 8, 1983, to Oct. 3, 1984, there was a ceiling of $24 million on intelligence support for military or paramilitary activity inside Nicaragua, thus blessing as well as financing these enterprises.

From Oct. 3, 1984, to Dec. 19, 1985, Congress reversed course and prohibited military or paramilitary support. Indeed for nine months no new funds were provided for any purpose, though existing funds could continue to be expended. After Aug. 15, 1985, humanitarian aid to the contras was reinstated to the extent of $27 million.

From Dec. 19, 1985, to October 1986, intelligence support was again permitted, though it was limited to advice and to communications equipment. At the same time the State Department was authorized to solicit humanitarian assistance from third countries.

On Oct. 18, 1986, Congress appropriated $100 million in humanitarian and military assistance after a 10-week hiatus while a meeting to reconcile technical differences between the versions of the two houses was stalled by opponents of contra aid.

What message was Congress seeking to send? What was the rationale for approving assistance to the contras but constantly changing the amounts and the conditions for using them? What rationale underlay the amounts approved? And how was the administration to interpret a congressional intent that changed so often? Did Congress approve the contras, leaving only the scale of support at issue? Or was Congress seeking to destroy the Nicaraguan resistance while being unwilling to assume responsibility?

Clearly Congress provided neither continuity nor criteria to which even the most scrupulous administration could orient itself. And all the while the contras in the field, not governed by congressional cycles, were in danger of collapsing before a new congressional appropriation could be passed. Of such stuff are institutional crises made.

This in no way seeks to justify the specific measures the Reagan administration took to deal with its very real dilemma of how to keep the contras alive from congressional cycle to congressional cycle. Neither self-financing nor lies to Congress can be excused. Nor were the administration requests to Congress free of disingenuousness. For example, were the sums requested by the executive branch based on an achievable strategy, or did they reflect a judgment of what the traffic would bear? Be that as it may, to focus exclusively on administration transgressions is one-sided and misleading; congressional incoherence and ambivalence require comparable attention.

The fundamental mistake made by the Reagan administration was to seek to achieve by indirection what it should have faced head on. It should have bent every effort to bring about a national debate on the choices before the country with regard to Nicaragua and to force a congressional vote on the minimum means required to achieve its view of national objectives.

There were at least three choices:

To coexist with the Sandinista regime unless it introduced high-performance Soviet military equipment into Nicaragua.

To bring pressure on Nicaragua to return to the inter-American system by expelling foreign -- especially Cuban -- advisers and reducing its military forces to traditional Central American levels in return for the United States' not challenging the Sandinista political structure.

To overthrow the Sandinista regime or at a minimum (and improbably) to change its character so that the Sandinistas became one political party in an essentially pluralistic process in which the contras also participate.

The only option achievable without military pressure -- contra or United States -- is the acceptance of the Sandinista regime without any conditions other than the exclusion of Soviet high-performance military equipment. The overthrow of the Sandinistas, on the other hand -- the third option -- would almost certainly require U.S. troops.

The irony of the American political process is that each of the two coequal branches of the government chose an option at the opposite end of the spectrum, but supplied means inconsistent with its preferences. A large militant minority in Congress pursued the illusion that diplomacy was an alternative to pressure. But while it is possible to debate the nature of the pressure, and of reasonable objectives, diplomatic success presupposes a balance of penalties and incentives. In the end, a hesitant majority recognized this reality and voted reluctantly for some contra aid, though never enough for even minimum objectives. This institutionalized ambivalence.

On the other hand, the administration's real objective has been the overthrow of the Sandinista political structure. This is unachievable by the means it has requested, which at best are enough for the second option: the expulsion of foreign advisers and reduction of Nicaraguan military forces. This institutionalized stalemate.

I make these criticisms with considerable sympathy and diffidence, for the administration in which I served reacted with similar ambivalence to comparable congressional challenges. In retrospect the Nixon administration's crucial mistake over the war in Vietnam (which it inherited) was not to insist on an up-or-down vote regarding its judgment on how to conclude the war. This would have required Congress to assume responsibility for its actions, would have avoided prolonged national anguish and would have brought a clear-cut resolution one way or the other. The Reagan administration will face the same endless controversy, and I fear the same unfortunate outcome, if it continues to finesse a national debate over Nicaragua.

Restoration of a sense of direction in foreign policy requires an end to hypocrisy and sanctimony. The administration must either ask for resources consistent with its objectives or reduce its objectives to attainable resources. Congress must stop carrying water on both shoulders, approving the principle of contra aid but salving its conscience by restrictions that doom it. It is, as well, time to stop the self-righteous claims that secrecy is in itself evil, especially in covert operations. What makes an operation covert is that parts of the government and Congress are excluded from full disclosure. It is imperative to debate the nature of the group that must be privy to information; it definitely must include some element from Congress. But in a world where the lines between domestic and foreign policy are eroding, the United States cannot be the only major country without a covert capability.

The United States urgently needs three things: 1) a compact between the executive and legislative branches defining the proper role for each with some precision; 2) a reassessment of how to conduct covert operations, and 3) a long-term program for Central America.

A vital democracy must be able to set realizable goals, and that must begin with mutual respect between branches of the government based on the conviction that serious people are dealing seriously with each other for the good of this country.