IN ONE OF Sherlock Holmes' famous cases, a vital clue turned out to be a watchdog that failed to bark. In the Lebanese crisis, the Soviet Union has played this role. Its virtual silence and inaction has been remarkable, raising the question of whether this is a clue to a broader Soviet change of policy.

Soviet behavior is all the more amazing considering Moscow's past record in the Middle East. In the Suez crisis in 1956, Khrushchev issued his first rocket warnings. A decade later, before the Six Day War, the Soviets encouraged Egypt to attack. In 1970, the Soviets provoked a tense air battle with Israel along the Suez Canal. And in the 1973 war, Brezhnev warned Nixon of direct Soviet intervention with its own forces, causing an American nuclear alert.

Nothing even remotely resembling these actions has characterized the Soviet Union's response to the Israeli invasion of Lebanon. Soviet official statements and letters to President Reagan have been moderate to the point of boredom. No great Soviet armada gathered off the Syrian coast. No severe warnings were given to Reagan, or even to Begin. Mo massive airlift was inauqurated. The Syrian air defense in the Bekka valley and a large part of the Syrian air force was demolished, but the only Soviet reaction was outrage at Syrian ineptitude.

As the PLO was evacuated (without any Soviet role), Moscow sent a message that bordered on sarcasm, congratulating the PLO for its courage. Finally the Soviets dutifully denounced the new Reagan peace plan, and countered by simply changing the dates on one of Moscow's old plans.

One theory is that the Soviet leadership is no longer up to these fast-breaking crises. Maybe so, but there are some problems with this explanation. First, the Soviets were warned. Soviet commentators were quite prescient in predicting the Israeli invasion and in understanding its political consequences. Soviet analysis at the outset of the crisis was superior to seeming American bewilderment.

Second, the Soviet diplomatic machinery was not at all paralyzed. Numerous Arab and PLO leaders trooped to Moscow during the crisis to meet with Gromyko. True, Brezhnev was vacationing throughout the summer. But since his return to Moscow he has met with Mrs. Ghandi, the South Yemen leader, and traveled to Baku to deliver a lengthy speech offering the Chinese a new bargain. The U.N. secretary general found him "very bright and active."

More plausible is that the Soviets recognized early on that the PLO was doomed and that Syria was in full-scale retreat. The Soviets were not about to pull out badly burnt chestnuts. They resupplied the Syrians after the air debacle, but Gromyko dismissed Syrian mutterings about a new ''strategic alliance."

By the time of the seige of Beirut in early July, the Soviets had told the PLO foreign minister visiting Moscow that the U.S.S.R. would not become further involved. Even when it appeared that U.S. troops might be landed, the customary Soviet warning was delphic: "The U.S.S.R. will build its policy with due consideration of this fact." Throughout Ambassador Philip Habib's tortuous negotiations, the Soviets were never a major problem or a significant obstacle.

By late August the Soviets were actually appealing to Reagan to use his influence to stop the bloodshed -- a rather amazing admission of impotence. A month later, on Sept. 20, after unveiling their own peace plan, the Soviets suggested to Reagan that the two powers might act jointly in the U.N. This did stop Soviet propaganda from issuing venomous charges that the United States knew in advance of the massacres at the Palestinian camps.

No doubt the Soviets have been chagrined by the pitiful performance of their various clients. The PLO seemed more interested in negotiating with the United States than taking a courageous stand; Syria was in a near panic, flying to Saudi Arabia for help. Libya counseled the PLO to follow the Jonestown example. The Arabs spread rumors of Soviet betrayal and the Soviets retaliated by accusing the Arabs, in effect, of cowardice. The Lebanese war, in short, was a severe Soviet defeat, and the United States is the immediate beneficiary. Even the horrors of the massacres are not likely to mean any gains for the Soviet Union. American troops are once again in Lebanon, and this time for a possible extended stay.

Soviet performance can be explained, but a more difficult question is whether the Lebanese crisis does provide a clue to a new Soviet policy. Are the Soviets deliberating restraining themselves?

Yes and no. Until the Afghan invasion and the Polish crisis, the Soviets were successful in making gains in the Third World (Angola, Yemen, Ethiopia). In the Middle East, they offered more and more support to the radicals; promoted a tripartite alliance among its clients, Libya, South Yemen and Ethiopia; deliberately raised the diplomatic status of the PLO in Moscow; resisted Camp David, and fought to undermine the Sinai withdrawal. The Lebanese debacle shattered this strategy. It left the U.S.S.R. with no Middle East position.

Moscow may hope eventually to recoup in Iran. The U.S.S.R. has become intrigued with the "antiimperialist character" of the Iranian revolution. The return of Iran as a power in the Persian Gulf would cause great instability among America's friends. Iranian blessing of the Soviet position in Afghanistan would give the whole enterprise legitimacy. And Iran's resurgence could lead to increased Soviet influence, since Iran cannot turn to the United States for military supplies.

Despite vicious treatment of the U.S.S.R. by the Khomeini regime, the Soviet gamble has been sufficiently important that Moscow abandoned Iraq in its war with Iran despite Iraqiidependence on Soviet arms and a 1972 friendship treaty. Syria also supported Iran, and the Soviets made their new alignment clear by signing a friendship treaty with Syria shortly after the Iraqi attack.

Thus the final chapter in the area has yet to be written. If the United States has replaced Russia in the Middle East, then Moscow is betting that it can replace the United States as the predominant power in the gulf.

In this light, a high-risk Soviet policy in the Lebanese crisis was dubious. It is one thing to be passive; it is quite another matter to suffer a direct defeat after running major risks. Moreover, a flamboyant policy in Lebanon would have jeopardized two other initiatives that the U.S.S.R. hopes will compensate for its failure in the Middle East.

The Soviets surely sense that the growing divisions between the United States and its European allies provide an unprecedented opening. The real contest is not the pipeline -- a second-rate issue -- but to forestall NATO missile rearmament.

If the Europeans can be enticed into a bargain, whether through diplomacy or popular demonstrations, then the Soviets may stand to make major gains. Salvaging a defeated PLO would scarcely be worth alarming Europe at this critical juncture.

Moreover, the Soviets are assiduously courting the Chinese, even to the point of allowing the Chinese to play the Soviet card to worry Washington. If there is even a remote chance of an accommodation with China, it has to be pursued. The economic future of the U.S.S.R. is in Siberia, where Chinese power is a growing threat. In this light, Lebanon is a diversion.

Thus, Soviet policy is on the defensive, and is returning to the basics of the balance of power in Europe and the Far East. Its policies could still cancel its losses in the Middle East. This is important, and Washington needs to abandon its tendency to wait for Brezhnev's successor.

Nevertheless, the Soviet position in the Middle East has never been worse, and this means that the chances for a negotiated peace have radically improved. This is the strategic significance of the Lebanese war. Whatever the revulsion and horror of that war, we should not be distracted from these longer-term consequences.