When President Reagan and House Speaker Jim Wright (D-Tex.) marched into the White House press room last Aug. 5 to announce a joint Central American peace initiative, both radiated optimism that they were ending six years of Republican and Democratic squabbling and making a new, bipartisan start on resolving the tensions between Nicaragua and its neighbors.

But 3 1/2 months later, in a week that began with Wright and the president's most senior advisers engaged in an angry exchange of insults, the Reagan-Wright initiative threatened to turn into the Frankenstein's monster of administration foreign policy.

In August, when the administration offered Wright a limited partnership on Central America, the move seemed to hold the promise of bringing in the speaker, with a dependable support base in the Democratic-controlled Congress, even though the administration planned to ask Congress for more aid to the Nicaraguan contras.

But two days later, the situation suddenly changed when the Reagan-Wright initiative had the unexpected effect of emboldening the presidents of Nicaragua, Costa Rica, Guatemala, Honduras and El Salvador to meet in Guatemala and sign a peace agreement.

Wright became an instant and passionate partisan of the pact. However, the administration, for all its rhetoric, has been torn from the outset by doubts about whether the Guatemala agreement can effectively end the threat of subversion in the hemisphere. Some influential administration officials and conservative Republicans continue to believe that the only sure way to deal with Nicaragua and end its ties to Cuba and the Soviet Union is through the Reagan doctrine's emphasis on thwarting communism through wars of national liberation.

That is what underlies the controversy of the past week. The administration now fears that Wright, instead of being content with the role of legislative junior partner, is trying to take control of U.S. policy and turn it irreversibly away from military solutions toward negotiated settlements in the framework of the Guatemala agreement.

Yesterday, a day after an acrimonious meeting at the White House, Wright and Secretary of State George P. Shultz appeared together on Capitol Hill to assure reporters that the latest quarrel had involved misunderstandings over tactics and had been patched up. But while they insisted that the speaker and the president remain united behind the goals enunciated last summer, there no longer is any doubt that the two view the Central American situation from different perspectives that almost inevitably will cause further clashes.

These differences were evident in the dispute that erupted last week when Nicaraguan President Daniel Ortega came here with a new bid for talks with the administration, which rebuffed him with the argument that Nicaragua's civil war must be settled by "Nicaraguans negotiating with Nicaraguans." Plainly, the administration wants to force Ortega's Marxist Sandinista government to negotiate with the contras, thereby acknowledging the resistance movement's legitimacy as a political force in Nicaraguan life.

As a result, the administration was enraged when Wright moved on his own, and in three days of highly publicized wheeling and dealing sought to work out a plan for Nicaraguan Cardinal Miguel Obando y Bravo to act as intermediary in indirect negotiations between the Sandinistas and contras on a cease-fire.

To the administration, that was tantamount to Wright usurping the functions of the secretary of state and undercutting the administration's policy of denying Ortega a high-level dialogue with U.S. officials until the Sandinista leader first engages in serious talks with the contras.

Wright saw the situation differently. While agreeing that indirect talks between the Sandinistas and contras are essential to progress in the peace process, he maintains there was almost no chance of enticing Obando into the mediator's role without some high-level encouragement from the United States. He says that when the administration refused to recognize that fact, he felt compelled to accede to requests that he do what he could to help bring about negotiations between the contesting Nicaraguan factions.

The potential for such differences apparently was not evident to either side last summer when White House chief of staff Howard H. Baker Jr., acting on a suggestion from a former Texas Republican member of Congress, Tom Loeffler, approached Wright to see if they could find a new basis for dealing with Central America in the wake of the damage to administration policy caused by the Iran-contra scandal.

Although senior White House officials deny it, many administration and congressional sources believe that Baker, aware that Reagan was unlikely ever again to muster congressional backing for a sustained guerrilla war against the Sandinistas, was looking for a way to disengage the president in a gradual, face-saving way from the contra policy.

"He seemed to be saying in effect that the White House would be amenable to a reduced level of aid that would keep the contras on life-support systems for the duration of the Reagan presidency," said a congressional source familiar with some of the Wright-Baker discussions. "The implication was that diplomatic solutions would be given more priority, and after Reagan was out of the White House, the new president could let the contra program die if he so desired."

On the other side, Wright, still a fledgling in the speaker's office, was looking to get rid of the contra aid issue with its potential for dividing House Democrats between those opposed to the contras and others, largely from southern states, supporting them.

In addition, Wright, long closely interested in Central America, had been convinced by his contacts in the region, including Nicaraguan Vice President Sergio Ramirez, that Nicaragua's mounting economic troubles were creating a more flexible climate there for possible peace negotiations.

What emerged on Aug. 5 was a call for the Central American countries to negotiate differences, halt aid to guerrilla forces in neighboring states, stop accepting outside military help, and move toward democratization.

The Central Americans' agreement two days later contained much of what was in the Reagan-Wright initiative. But some key elements -- notably the provision for ending military ties with countries outside the region -- were missing. That difference started subjecting the Wright-Reagan alliance to stress within days after it was forged.

Like Costa Rican President Oscar Arias, principal author of the Guatemala accord, Wright holds the view that while the agreement is far from perfect, it does require Nicaragua to take liberalization steps that cannot be reversed easily and that could provide a basis for greater democratization in the future. Echoing Arias' cry of "Give peace a chance," Wright consistently has argued that it is worth gambling on giving Nicaragua a chance to prove its sincerity about easing repression and seeking peace.

By contrast, the administration wants to be certain the process will end with Nicaragua transformed into a fully democratic country shorn of all ties with the communist bloc.

Baker's original pragmatic approach quickly was overwhelmed by an outpouring of demands from the Republican right that pushed the administration into viewing the Guatemala accord with an attitude that at times has verged on hostility.

Inevitably, the differences led to skirmishes between Wright and the executive branch, including an unsuccessful White House attempt to dissuade the speaker from inviting Arias to address an unofficial joint meeting of Congress, and a narrowly averted showdown over whether Congress should vote $270 million in new military aid for the contras. Warned by Wright that he would oppose such a move, the administration postponed the request at least until January.

The clash over Wright's dealings with Ortega last week exposed how wide the gulf between Wright and the administration has become.