THE AMERICAN retreat at the United Nations was a pathetic performance. The administration marched up the hill, on a Security Council resolution criticizing Israel, in a seemingly improvised, slapdash style that made you wonder if the secretary of state, supposedly a lawyer's lawyer, had passed the bar. It fell back down the hill, in its disavowal of the U.N. vote, in a manner that left onlookers puzzling over whether, as the administration said, there was a "failure in communications," or whether there was not an element of deceit as well.

The administration has itself to blame for its current embarrassment. But the basic problem is of Israel's making: the settlements Israel has been establishing since 1967 in territory taken from Arabs. The United States has never done more than file formal protests against these settlements. Successive Israeli governments have accepted these slaps on the wrist, and kept on settling. The policy has been creeping annexation in the West Bank, creeping co-option in Washington.

You might think that once talks began on Palestinian autonomy, new settlement would be suspended. But the Israeli right, on which Prime Minister Menachem Begin depends, has seen continued settlement precisely as a way to undercut the autonomy talks. Thus the cabinet last month moved Israel a long step toward authorizing Jewish settlements in the heavily Arab-populated areas of the West Bank -- in Hebron. Seeing through this purpose, the United States sought to fire a powerful warning shot -- in a U.N. resolution. Even when Arabs overloaded the resolution with a lot of other grievances, the administration stayed aboard. That was the American mistake: apparently the State Department's Arabists felt President Carter was mad enough to go along, but then the Israelis and parts of the American-Jewish community howled and Jimmy Carter got off.

Politically, Mr. Carter has made a gift to all of his presidential rivals. Diplomatically, he has made the United States look foolish. Whether the Carter administration has any Middle East policy left, beyond muddling through, is a necessary question.

Meanwhile, the Israelis have some thinking to do. They have still not taken the specific official steps requisite to authorizing settlement in Hebron. Mr. Begin could take those steps easily -- and be lionized by some of his supporters for facing down the United States. Or he could defer those steps and throttle back on the settlement thrust they serve and, in that fashion, work to restore Israel's good name. Transient tactical blunders by the United States cannot obscure Israel's major continuing strategic blunder in forcing more Jewish settlements on Arab land.