WITH the release of Joseph Cicippio and Alann Steen, the end of the long hostage drama is coming faster than many had dared hope.The freeing of Mr. Cicippio and Mr. Steen marked an important qualitative development in the hostage-release process. For the first time, two of the three main Beirut kidnap cells have freed their last remaining hostages, bowing out of the affair once and for all. Released hostages have made it clear that the various kidnap groups are separate on the ground, since captives held by one cell have had no contact with those held by another. But, according to many Lebanese Shiite sources, they are all loosely affiliated to the Iranian-backed Hizbullah and have strong ties with Iran. Cicippio was held by the Revolutionary Justice Organization, which over the years abducted at least seven Frenchmen as well as two Americans. Steen was a captive of the Islamic Jihad for the Liberation of Palestine (IJLP). Its agents posed as Lebanese policemen to seize Steen and three other professors, two of them Americans, from the campus of Beirut University College in January 1987. Terry Anderson, the longest-held and last remaining United States hostage, is held by the original kidnap cell, the Islamic Jihad, which stands to gain the dubious distinction of being the first group to take Americans hostage and the last to free them. Predictions from Iranian, Syrian, and Lebanese sources have said Mr. Anderson is likely to be freed very soon, perhaps in a matter of days. At this stage, it seems unlikely that there will be any major problems. It was the Islamic Jihad which initiated the current process by freeing British journalist John McCarthy in August, and gave it a major boost by releasing Terry Waite and Thomas Sutherland Nov. 18. Anderson's release would leave two German aid workers still in captivity. Their case is linked to that of two Lebanese radicals, the Hamadei brothers, jailed in Germany on hijack, murder and kidnap charges. But the United Nations, Germany, Iran, and Syria have begun to work actively on the German case. UN Secretary-General Javier Perez de Cuellar and special envoy Giandomenico Picco have won many plaudits for their handling of the complex negotiations underpinning the hostage releases. But diplomats and observers point out that mediation, however skilled, could have achieved nothing unless other, more fundamental elements had fallen into place. They believe a decision by the Iranian leadership to close the hostage file is the most crucial factor in the equation, with the Iranians striving toward more normal relations with the West. The US decision on Dec. 2 to release $278 million in compensation for seized Iranian military purchases may be an indication of those relations warming up. The door to a rapid denouement of the hostage drama was apparently opened by an agreement reached in Damascus under UN mediation last weekend. The UN itself later issued an unusual statement in the Syrian capital announcing that "important progress" had been achieved on the hostage issue. It added that a "basic understanding" had been reached on a comprehensive approach to such issues as the Lebanese detainees being held by Israel and its proxy South Lebanon Army (SLA) militia, and the Israeli servicemen missing in Lebanon. When Mr. Waite and Mr. Sutherland were freed last month, the linkage between hostages, Lebanese detainees and missing Israelis had apparently been dropped. The leader of Hizbullah, Sheikh Abbas Musawi, later said the kidnappers had decided to complete the release of Western hostages without regard to the Israeli dimension. But under the new agreement, the three elements are apparently linked once again - though more loosely than before. According to the IJLP, in its announcement heralding Steen's release Dec. 2, the accord stipulates that the Western hostages are to be freed first. In various statements, however, the kidnap groups said they had received pledges that the Lebanese detainees - including the abducted Hizbullah cleric, Sheikh Abdel Karim Obeid - would be freed soon. At the request of Mr. Perez de Cuellar, the Israelis and their SLA allies freed 25 Lebanese prisoners on Dec. 1. For that, Israel received nothing immediate in return by way of information about four missing servicemen who remain unaccounted for. Israeli officials may, observers believe, have seen this as the price for buying back into a process from which they had risked being excluded. Tehran Radio reported that under the terms of the agreement for the final hostage releases, the kidnappers have received pledges that they will not be subject to retaliation by the hostages' nations. Such pledges could certainly help explain the sudden, swift movement toward ending the hostage affair. But Perez de Cuellar denied that any such guarantees had been given.