WHEN hostage Terry Anderson was released last week, an observer noted that the United States government was not among those he thanked for bringing about his freedom. As difficult as it may be to accept, the truth may have been that the powers in Washington have been the least capable of exerting effective influence on the captors and their sponsors.Through several administrations, US policy has been "no negotiations with terrorists." History has, perhaps, demonstrated that this was not only an expression of principle but an inescapable reality as well. No doubt exists that US presidents, from Jimmy Carter to George Bush, have personally felt, as did the officials around them, the agony of the families and the hostages and the frustrations of the unresolved captivity. Yet the experience of these years suggest that US efforts, whether by officials or intermediaries, have raised unrealistic expectations in the captors and created political embarrassment at home. Americans have not been the only Western nationalities taken captive in the Middle East. French, Germans, and Italians were also taken. In each of these cases, however, the kidnappers had specific objectives (such as Arab prisoners in Germany). In the cases of the American citizens, the assumption has been more ambitious: If its government so chose, the powerful US could force Israel and conservative Arab governments to do the captors' bidding. With that belief went the conviction that Washington would b e under inescapable pressure from politicians and relatives to bring about what the captors wanted - all the way to an end to captivity for Palestinians and Lebanese held by Israel. The history of direct initiatives to free hostages by US officials has not been encouraging. When the embassy hostages in Teheran were taken in 1979, President Carter sent former Attorney General Ramsey Clark with a message to the Ayatollah Khomeini. Mr. Clark never reached the Iranian capital, but his dispatch may have been seen by Khomeini as a sign of the ultimate political value of the hostages to Iran. Sending Robert McFarlane and Oliver North to meet "moderates" in Iran in 1986 may have had the sam e result - to reinforce the belief in the vulnerability of the US to pressure and thus to raise the stakes in the affair. Throughout this period, the spotlight on the non-negotiation policy meant that, in the glass house that is Washington, probes did not remain secret. The Iran-Contra affair reinforced the reluctance to make such probes, making it virtually impossible for a US official to make a secret effort without its ultimately being disclosed and becoming a political disaster. The alternative to a direct effort by the US was to find a non-American interlocutor. Various private individuals over the years offered their services and some were tried. In most cases, they proved to have their own objectives, usually the hope that their involvement would further their personal advantages. Many proved unreliable and led US policy makers down dead-end paths. In the case of the American embassy hostages in Iran in 1979 to 1981, the Algerian government effectively filled the role of intermediary. Given that the hostages were US diplomats, that the government of Iran was directly involved, and that the complex tangle of the frozen Iranian assets needed to be resolved, a government mediator became essential. More recent hostages in Beirut presented a different problem. They were held by shadowy groups, not by governments, even though Iran and Syria had influence. Iran, in particular, had poor relations with the US, and both countries were inhibited from playing, until recently, more than a limited role because of their own tangled obligations to groups in Beirut. The role of the secretary general of the United Nations and his skillful envoy, Giandomenico Picco, in these circumstances became indispensable if the issue was to be resolved. US administrations have been criticized for the policy of "no negotiations with terrorists." It has seemed a heartless policy. Yet the recent past suggests that, although US citizens are hostages, in the murky caverns of the Middle East, only those envoys unburdened by an identity with the US can untie the hostage knot.