THE INTERESTING thing about the president's twin retreats on South African sanctions and trade in the the past two weeks is that they have been viewed in many quarters as signs not of weakness but of resiliency and even strength. Had Mr. Reagan's predecessor moved away from strong positions on two such issues in so short a time, the worried talk would have been of lack of resolve in the upper reaches of government. With Mr. Reagan, what you mostly have instead is connoisseurs debating tactics.

One of the reasons for this is surely that Mr. Reagan's aides have made no great effort to dress up or disguise what happened. Quite the contrary: they acknowledge that he was losing control of both issues, and shifted his ground in hopes of avoiding worse defeats. That allows them also to say that his basic convictions have not changed. There is almost a good-natured quality to this recounting of events; it is, after all, the way the system is supposed to work. And by compromising, the president has muddied the politics of the two issues. That may be what is infuriating his critics most. When the trap finally clangs shut, he will have moved.

The more serious question is not how skillfully the president has played the game, but whether there has been a longer-term position shift of a different kind. For most of his five years in office Mr. Reagan has been remarkably successful at controlling the terms of national debate. On several occasions this year he has seemed to lose that control. In the budget debate that preoccupied Congress the first seven months of the year, his position was -- as in previous years -- that the burden of deficit reduction should be borne by domestic spending programs. Much more than in any previous year, Congress defied him on this basic question of priorities, and did most of its cutting in his defense request instead.

An even more basic issue between the president and legislators now is the agenda for the rest of the year. They forced him to deal with the sanctions question; they also want to talk about trade, a subject on which he is not comfortable. He wants the spotlight on tax reform instead. So far, that remains an unrealized issue. Mr. Reagan may yet force it to center stage, but what members of Congress thought they heard at home in August was that nobody cared. In a way, what Mr. Reagan and Congress are fighting over now is the home-court advantage. In his first term, the president always had that. It is not clear that he still does.