SOME OF THE HEADLINES say that United Nations Secretary General Kurt Waldheim returned empty-handed from Iran. But this is only partly so. True, he made no visible progress in gaining the release of the hostages. Indeed, he was shunned by Ayatollah Khomeini, condemned by the militants holding the Americans and intimidated by mobs, notwithstanding his obviously earnest effort to be open to different Iranian points of view. The only official contacts permitted him were with elements who seem to have shown at least some interest in his mission but whose authority in the matter of the hostages is slight.

But Mr. Waldheim did return with something. The Security Council had dispatched him to Tehran to make one last stab at negotiating the immediate release of the hostages, before the United States put the question of economic sanctions to the council. He returned with all the evidence fair-minded people need that Iran has left no honorable alternative to sanctions. Some Third World countries in particular had felt it desirable, or politically necessary, to knock once again on Ayatollah Khomeini's door. They and others had hoped that Moscow's invasion of Afghanistan might have given Iranians reason, or at least pretext, to back away from the self-destructive confrontation with the United States that the militants precipitated by seizing the American Embassy on Nov. 4. It was worth a test, and Mr. Waldheim conducted it. Iran chose to fail.

It's a busy time at the Security Council. A dispute between Chile and Colombia has kept open the fifteenth seat, creating an incipient lawyers' fiesta. Four dozen and more nations, including a sizable contingent from the third World and Islam, are cranking up to indict the Soviet Union for its Afghan thuggery -- it will be interesting, by the way, to see how Cuba combines its obligations as a Soviet client with its duties as current chairman of the nonaligned movement.

But the Security Council, in its resolution of Dec. 31, did accept a commitment to take "effective measures" if the hostages have not been let go by Jan. 7. That means sanctions, one of the ways prescribed in the United Nations Charter by which the company of nations can discipline a miscreant member. The sanctions process may or may not help Iran focus its attentions on its responsibilities to foreign diplomatic personnel. It certainly will tell Americans, and everyone else, who are the friends of order and civility in international affairs and who are the foes.