President Carter moved to repair his shattered relations with the AFL-CIO yesterday as White House inflation fighters claimed success in the first major test of the administration's wage guidelines.

Carter met for nearly 90 minutes with AFL-CIO President George Meany in a peacemaking session arranged by Labor Secretary Ray Marshall that resulted in claims of improved relations from both sides.

But labor sources said deep-seated differences remam over issues ranging from inflation to foreign policy and suggested that little was achieved beyond a restoration of communication between the White House and AFL-CIO leadership. Such communication barely existed in recent weeks.

The administration's hand was strengthened going into the meeting by a new wage agreement from the Oil, Chemical and Atomic Workers Union (OCAW), an AFL-CIO affiliate, that officials said conforms to the administration's guidelines of 7 percent a year in pay and benefit increases over the life of a contract.

Meany has bitterly attacked the guidelines as unfair to labor, which has led the administration to start going over his head to individual unions or the businesses they bargain with in an attempt to make the guidelines stick.

The strategy apparently succeeded with the oil industry. Despite vows to bargain independently of the guidelines, the OCAW -- its strike weapon blunted by extensive automation of oil refineries -- bowed to the guidelines Thursday night in approving contract offers of 13 percent over two years from Gulf Oil Co. and Standard Oil of Indiana (Amoco). Under pressure from the government, the oil companies had refused to budge from the wage guidelines.

The contracts, which other companies are expected to accept as an industrywide pattern, call for an increase of 8 percent the first year and 5 percent the second. A renegotiation clause was added for 1980, permitting wage and benefit increases up to 6 percent if the guidelines are still in effect then or more if the guidelines have collapsed.

Government sources quoted industry officials as saying wage increases would have amounted to at least 10 percent a year without the guidelines.

The contracts still must be ratified by local bargaining units. Barring upsets, administration officials said the OCAW agreement means the government will be in a stronger position to lobby for the guidelines in this year's big contracts, including trucking, rubber, electrical manufacturing and autos. A guideline-busting contract from the oil industry "would have doomed the program from the outset," a high-ranking government official said yesterday.

There was luck, as well as irony, for the government in having oil as the curtain-raiser for this year's round of contract bargaining.

The oil companies' dependence on federal policymaking and their ability to withstand a strike because of automation made them down-the-line guideline supporters. The irony comes in the fact that refinery workers' wages are an infinitesimal contributor to product costs, which, in any case, are exempt from oil price controls and are expected to rise substantially for reasons other than higher labor costs.

Government officials acknowledge that future bargaining by bigger unions with the power to call crippling strikes, starting with the Teamsters in March, will be more difficult.

Although the anti-inflation program was the breaking point last fall in increasingly distant relations between Carter and Meany, it was not dwelt upon in comments after the White House meeting yesterday -- apparently to keep the facade of good will from cracking.

"I think we cleared the air and will be able to communicate better," said Meany, adding that communication rather than issues was the focus of the meeting.

Asked if he was now happy with Carter, the 84-year-old labor leader said, "I didn't say that." Asked if he was unhappy with Carter, Meany responded, "No, I'm not unhappy with him."

Many, who has accused Carter of betraying his own liberal backers and described him as the most conservative president since Calvin Coolidge, denied widespread reports of deep personal animosity between them. "Not at all," Many said airily.

William Winpisinger, president of the International Association of Machinists and one of six union presidents who accompanied Meany to the meeting with Carter and Vice President Mondale, said he did not come away with the impression that Carter "would do anything differently" than he had been doing. Asked if he was prepared to change his mind and support Carter in 1980, Winpisinger said, "Not at this point."

Labor Secretary Marshall issued a statement, with which an AFL-CIO aide said Meany concurred, saying both sides agreed "we must continue a close and cooperative relationship" with "through and timely consultations." Marshall termed the meeting "friendly and productive."

Mondale told a reporter he thought the labor leaders "felt good" about new consultative arrangements that were discussed. He said the meeting "went well."