President Carter insisted yesterday that "progress is being made" in the effort to free the American hostages in Tehran and cautioned against going from "extreme optimism to extreme pessimism every time some action is taken or some speech is made in Iran."

In his first public reaction to Ayatollah Ruhollah Khomeini's surprise statement Saturday that the fate of the hostages will not be decided until April, Carter said that "there's no way of telling an exact schedule" for their release.

While the president refused to go into details, he and other administration officials mounted a strenuous effort last night to reassure the American public that negotiations with Iran are still under way and that they are hopeful of a successful outcome.

Carter's guarded talk of "very sensitive and very difficult efforts" taking place behind the scenes came as a United Nations commission met in Iran with President Abol Hassan Bani-Sadr and Foreign Minister Sadegh Ghotbzadeh, one day after arriving in Tehran. The commission reportedly was told it would receive broad cooperation in its inquiry into Iranian grievances against the deposed shah, Mohammad Reza Pahlavi.

News agencies reported from Tehran that Iranian officials continued to stress that the commission's mission was not to win the release of the estimated 50 American hostages held by Islamic militants who seized the U.S. Embassy Nov. 4.

Bani-Sadr, after a meeting of the ruling Revolutionary Council, told reporters in Tehran last night that the U.N. commission would see the hostages, but a spokesman for the militant disagreed.

"The work of the U.N. commission has nothing to do with the hostages, so there will be no plan for the commission to visit the embassy," the spokesman said, according to Reuter.

These contradictory statements coming out of the Iran were cited by administration officials in warning that the U.S. public should not leap to hard-and-fast conclusions on every unexpected development emanating from Iran's confused and tumultuous internal political situation.

Khomeini, speaking from the Tehran hospital bed where he is recuperating from heart trouble, stunned official Washington Saturday with his statement that the hostages would not be freed until the issue is decided by Iran's parliament, which probably will not meet until Arpil.

Carter, in an obvious effort to stemimpatient new calls here for action stopped to talk with reporters as he returned to the White House from a weekend at Camp David.

"What we want is a peaceful resolution of the problem," he said, "and I believe that if we show good judgment and perseverence and good faith on both sides, then we can be successful."

Referring to Khomeini's statement about April, the president added;

"Obviously I would have preferred that the speech had been different. But I can say I am not cast into the depths of despair or pessimism. I think progress is being made, but I can't discuss any details of what we are doing."

In private, administration officials refused to go beyond a State Department warning Saturday that Khomeini's announcement is susceptible to more than one interpretation, including the possibility that it was intended for domestic political consumption within Iran.

The officials said it was incorrect to assume that the United States is in the dark about what is happening in Iran and cautioned repeatedly about constructing what one called "any number of theories" about the meaning of Khomeini's remarks. But while they kept hinting that a number of things are happening in secret, the officials flatly refused to expand on what they might be.

Meanwhile in New York, Mansour Farhang, Iran's ambassador to the United Nations, denied reports that the investigating commission's work would coincide with the release of the hostages.

Farhang, appearing on CBS-TV's "Face the Nation," said, "There was no linkage between the formation of the commission and release of the hostages, if by linkage you mean a deal. Ayatollah Khomeini, who has the ultimate authority over the crisis, does not make deals."

Khomeini's statement, Farhang said, "means that the parliament will decide but exactly what else can take place between now and then remains to be seen."

Informed sources in Tehran yesterday told The Washington Post that Khomeini's surprise statement was an effort by the powerful religious leader to reassert his authority after being largely sidelined by heart trouble.

According to this line of thinking, Khomeini's hard-line statement, including a harsh attack on the United States, was intended to restore a balance between Bani-Sadr, whose moderate policies had become dominant in recent days, and the Islamic militants whose support brought Khomeini to power.

Khomeini's announcement, however, marked a fundamental change that could help resolve the crisis. Saying that the parliament, not the militants, will decide the fate of the hostages in likely to strengthen the hand of Bani-Sadr, who has sought an early release of the hostages and who is likely to control the new parliament.

Observers noted that for the first time Khomeini did not directly link the hostages' release to extradition of the shah, although he repeated Irans demand for his return.

He specifically mentioned for the first time a mechanism for the release of the hostages -- the new parliament.

Other observers noted, however, that hopes for the release of the hostages had been raised on the occasion of two previous Iranian elections -- a constitutional referendum in November and the presidential election last month -- with no significant results.

The presence in Tehran yesterday of three French lawyers who have played a key intermediary role between the United States and Iran was seen as another hopeful development.

The three -- Christian Bourgeut, Bertrand Vallette and Francois Cheron -- have been intimately involved in winning Iranian acceptance of the current U.N. effort.

The U.N. panel was formed by Secretary General Kurt Waldheim, with the approval of the As formed by Secretary General Kurt Waldheim, with the approval of the United States and Iran, to investigate Iran's grievances against the shah, who was strongly supported by the United States until his ouster a year ago. The investigation has been seen as a step toward release of the hostages.

After the panel met with Bani-Sadr today, a spokesman called the session "very fruitful." Tehran Radio broadcast a statement by the members thanking Bani-Sadr for his assurances of cooperation and saying, "We will go ahead in carrying out our mission."