Iran's Revolutionary Council announced tonight it accepts -- although grudgingly -- an attempt by U. N. Secretary General Kurt Waldheim to negotiate the release of American hostages at the occupied U.S. Embassy in Tehran.

The council's decision was far less than an enthusiastic welcome. It nevertheless cracked open the door for the two-stage plan proposed by the United States at U.N. headquarters calling for a mediation mission by Waldheim followed by economic sanctions if he fails to win release of the hostages.

There were immediate signs, however, that Waldheim would encounter difficult if not insurmountable problems in his attempt to get the hostages of the embassy, where they have been held captive since Nov.4.

Ayatollah Rudollah Khomeini, Iran's Islamic leaders, has no plans to receive the U. N. envoy, according to council spokesman Hassan Habib. In addition, Islamic students occupying the embasy told reporters they rejected the Waldheim mission even before the official announcement that he was coming. t

With the students in full control of the hostages' fate, and with Khomeini the only Iranian leaders whose authority they respect, these two declarations seemed to leave as negotiating partners for Waldheim only government officials who cannot make firm decisions concerning the hostages.

Foreign Minister Sadegh Ghotbzadeh, a Revolutionary Council member, also went out of his way to depcit the decision to accept Waldheim as a reluctant one made only because Waldheim requested permission to visit Tehran.

"It is not an ivitation," he said after tonight's council meeting."Waldheim requested to come and there is no opposition to his visit."

Ghotbazadeh's icy tone was assumed to reflect Khomeini's own attitude. The foreign minister traveled to the holy city of Qom earlier today to confer with Iran's overall religious and political leader and get instructions for the council's decision.

Waldheim's request to visit Tehran and seek release of the hostage was relayed to the 79-year-old leader by Pakistani Foreign Minister Agha Shahi, who visited his Qom headquarters last week during a two-day stay in Iran, diplomatic sources said.

A U.N. representaive in Tehran, Zohair Yammin, also has been in contact with Ghotbzadeh and other Iranian oficials in the last several days in preparation for the Secretary General's mission. Khomeini apparently felt obliged to accede to the Waldheim visit because of the United Nations' reputation as a champion of the Third World causes espoused by Khomeini since he took over Iran early this year. But at the same time, the comments from his aides strongly indicated that Khomeini still is reluctant to commit himself to giving up the catalyst for nationaly unity represented by the American hostages, even to Waldheim.

A well-informed Moslem diplomat here predicted today that Khomeini will let the students keep their captives in the embasy at least until after Iran's presidential elections scheduled for Jan. 25.

The crisis with Washington generated by the hostages has diverted Iranian public attention from serious problems here including regional unrest, economic dislocation and lack of organization in the new government. Its continuation could help steer electioneering away from these problems and focus it instead on the anti-American and anti-Shah themes played with such success so far by Khomeini and his followers.

In addition, there has been no sign here that Khomeini has any real fear of international economic sanctions. He also has viewed the threat of sanctions as an opportunity to rally the country, urging national untiy and increased self-reliance as the remedy for any halt in imports.

Less reliance on the massive imports of the shah's reign has been a goal of Iran's now Islamic leadership ever since it took power in any case, and may imports have been cut off or restricted. Moreover, Iranian economists say even stiff sanctions would not have a strong immediate effect here unless they included a halt to food imports and oil exports.

Habib underscored the limited authority of the nominally ruling Revolutionary Council in any decision concerning the hostages, apparently setting the stage for the Waldheim mission.

"The release of the hostages is the decision of the Imam," he said. "This authority has not been given to the Revolutionary Council."

There was no indication whether Waldheim will be allowed to visit the hostages inside the embassy or whether he will receive from the students an accurate count of how many Americans are held.