It may not be clear amid the political sound and fury, but Congress and President Reagan are basically in agreement about the future of the U.S. Marine force stationed in Lebanon.

The president wants authority to keep the Marines on the job there. The vast majority of members of Congress, Republicans and Democrats alike, say they are willing to give him that authority for at least six months and possibly longer.

The lengthy negotiations and angry words between Reagan and congressional Democrats concern not the substance of the issue but rather the legal basis for continued Marine deployment. The argument is complicated because it involves cherished institutional prerogatives and a complex piece of legislation--the War Powers Resolution of 1973--that has never before been seriously at issue.

Congress passed the resolution over President Nixon's veto in reaction to the Vietnam war, which had dragged on for eight years without a declaration of war.

The law was designed to force presidents to report to and consult with Congress whenever troops are sent overseas, except for routine training or as replacements at U.S. bases. More importantly, it set time limits that are supposed to force a president to get Congressional approval for extended deployment of troops in a hostile situation.

The central legal question in the present dispute is whether those time limits apply to the Marines in Lebanon. Congressional Democrats, and some Republicans, say the limits apply, and the clock is ticking. The White House disagrees.

The War Powers Resolution contemplates three general circumstances under which U.S. troops might be sent overseas.

The first is a routine training mission or replacement of soldiers already stationed on foreign soil. The law does not apply to this situation.

The second involves U.S. troops "equipped for combat" sent to a foreign outpost where hostilities are not likely. In this case, the resolution requires a presidential report to Congress when the troops are dispatched and periodically as long as they stay. There are no time limits on such a deployment.

The third situation covers dispatch of U.S. troops "into hostilities or into situations where imminent involvement in hostilities is clearly indicated by the circumstances." This section is covered in section 4(a)(1) of the law, the section that congressional Democrats have been invoking in their argument with Reagan.

That section of the law says troops involved in "hostilities" or "imminent hostilities" must be brought home within 60 days--or 90 days in special circumstances--unless Congress declares war or provides specific authorization for a longer deployment.

Are the Marines in Lebanon engaged in "hostilities"?

The White House says "No." When Reagan sent the Marines there 50 weeks ago, he told Congress he had "no intention or expectation that our armed forces will become engaged in hostilities." Even after four Marines were killed by shellfire two weeks ago the administration said the force was not engaged in hostile action, and that no time limits apply.

Congressional Democrats--and many Republicans--say the "hostilities" provision of the law went into effect on Aug. 29, the day the first two Marines were killed. If this is so, the 60-day time limit in the law would be in effect and Reagan would have to withdraw the Marines by Oct. 28, unless Congress grants an extension.

The law requires that the president notify Congress whenever U.S. forces overseas come into "hostilities." If a president fails to do so, the resolution permits Congress to declare that hostilities have occurred and that the law's time limits are in effect.

The constitutional crunch would occur 60 days after Congress unilaterally declared that the time limits had begun, when Congress would claim that U.S. troops legally cannot be kept overseas. But a president might respond that the time limits are not in effect and thus ignore the congressional directive.

A serious constitutional crisis could follow.

Interviews with members from both parties indicate that Congress will readily approve an extension of authority. Before that happens, though, Democrats want Reagan to concede that such authorization is required--that is, that the time limits in the War Powers Resolution apply to the Lebanon force.

So far, at least, the White House has been unwilling to give in on that point.