When Secretary of State Edmund Muskie first went head-to-head with his Soviet opposite number, Andrei Gromyko, on the subject of the Russian invasion of Afghanistan, there was, as they say, a frank exchange of views. It's the stuff of archives now, perhaps. But it may be worth passing along to the Reagan crowd, for what it says about one of the toughest foreign policy challenges confronting the president-elect.

Gromyko started it. Why, he wanted to know, was the United States so concerned about Afghanistan? The Soviets had a problem of instability on their border and, after all, they were invited in.

Muskie reportedly replied: "What troubles us is the geography of Afghanistan. This puts you in a better position to be a threat to us, in a very real way, and whether you intended that when you went in is really rather irrelevant. You could change your mind, or some future Soviet leadership could change the intention.

"That's why withdrawal is stated as our objective, because we want you to get out of that geography and that's my point."

Clear enough; no "zigzags" or "vacillation" there. It is, in fact, a fair summary of what you would expect the attitude of Ronald Reagan to be when he becomes president. So what was Gromyko's answer? I asked Muskie.

"He went on to the next subject," was the reply.

And that, it would seem, is pretty much where matters stand today. There is still, technically, a Carter Doctrine (also destined for the archives) that answers the Afghanistan invasion with a firm statement of official U.S. government policy:

"An attempt by any outside force to gain control of the Persian Gulf region will be regarded as an assault on the vital interests of the United States. It will be repelled by use of any means necessary, including military force."

There is the grain embargo, still in effect, and the draft registration of 19- and 20-year-olds, which, together with the only partially effective boycott of the Moscow Olympics, constituted the main elements of the immediate American response to Afghanistan. There also is a hasty scramble to assemble a Rapid Deployment Force and to beef up the permanent U.S. military presence and emergency capablility in the Gulf region with a considerably expanded Navy, a prepositioning of military supplies and spare parts and arrangements for transitory use of ports, air bases and other "facilities."

But not even the Carter administration would claim that the United States is anywhere near to having "military force" capable of repelling "an attempt by any outside force to gain control of the Persian Gulf region." And still less, from all available evidence, would the Reagan administration-in-waiting. l

So the question is no longer what Reagan might have done differently to respond to -- or perhaps even deter -- the Soviet plunge into Afghanistan. The election campaign is over. The question is: what will he do differently when Afghanistan inevitably comes up in his administration's first encounter with Soviet officials to keep them from moving on briskly to the next subject? w

Not much, is my guess -- or at least not much anytime soon. It's not even clear that Reagan would retain draft registration or the grain embargo, even though the latter has worked a genuine hardship on the Soviets. There has been much talk from the Reagan inner circle of using a much bigger stick: more nuclear firepower, upgrading of military personnel, more of the same Carter effort to increase the U.S. military capability in the Gulf area, plus the addition of permanent bases, with permanent American ground and air deployments.

But the intent will have to weigh more heavily in Soviet perceptions than the content of this buildup if it is to have much immediate effect. Adding real sunstance to American military power will take many months.

Concentrating it in the Gulf region raises difficult and delicate diplomatic problems as well. Not even the principal potential beneficiaries are eager for a high American military profile in their neighborhood.

The Reagan people also pin great hope on "linkage" -- tying Afghanistan to other East-West issues across the board. But the Soviets' stated reason for invading Afghanistan was to restoree "stability." Leaving aside what else they may have had in mind, they are almost incapable of leaving with that mission unaccomplished.

In the view of the Carter incumbents, and the words of Jimmy Durante, "Dese are de conditions dat prevail." Only by changing them drastically is Ronald Reagan likely to be any more successful than Ed Muskie in making Andrei Gromyko stick to the subject of Afghanistan.