WHAT IS ONE to make of the irrepressible Anwar Sadat's disclosure that, when the Soviet Union invaded Afghanistan in 1979, Jimmy Carter secretly undertook to have Egypt send leftover Soviet arms through Pakistan to the Afghan rebels? It is not the kind of tale nations usually tell about their friends, and it may come as a bit of an embarrassment to an administration that has made much of Communist support of other resistance movements.

Yet there is some advantage in having everyone know that American support for Afghan independence springs from a national consensus, not from the particular slant of one administration. Americans do not have to apologize for helping Afghans fight Soviet aggression. The Soviet Union, with upward of 85,000 troops tied down in Afghanistan, is poorly placed to complain of others' "interference."

How is the fight going? Evidently, not badly, if the measure is a capacity to inflict costs on the occupier, to prevent the Kabul regime from extending any sort of political base and to keep the cause of liberation before the world. Yet it seems no less evident that the Soviet Union can carry the considerable military and physical costs indefinitely and that it hopes the diplomatic costs of invading an Islamic country can be defrayed. Nothing like a military victory by either side is in the cards. The relevant question is whether the resistance has built up a position from which a negotiation could begin. Soviet withdrawal would be traded for the establishment of a mutually agreeable regime.

So far the Soviets have stood fast on a demand that their puppet be recognized before any talks begin. The Afghan resistance groups naturally reject this, and neither of the countries who comes closest to representing their interests, Pakistan and Iran, countenances it. The United Nations is offering its good offices in an attempt to see whether Pakistanis and Afghans might somehow be brought together --on the party level, so that the meeting would not confer official recognition.

This appears to be the only working channel, but it is the attitude of the great powers that will finally tell. At a certain point the United States may have to decide just what it thinks of a negotiated solution, particularly since any such solution, because it will in part accommodate Soviet interests, will be imperfect from an American point of view.Inside the Reagan administration a quiet debate is brewing. Some see an advantage in having Moscow stay tied down in Afghanistan and others see an advantage in settling down the region. The responsible course is, if Afghan self-determination is restored, to settle the region down.