The impasse over the federal budget persisted last night, with President Reagan and Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) both endorsing the idea of compromise but still balking at specific proposals.

Reagan and O'Neill talked by telephone yesterday morning, and each said separately before reporters and television cameras that he was eager to see the 10-week deadlock broken.

But as key legislators of both parties met with administration officials for another bargaining session in the White House theater, the two principals continued to fence with each other and avoid direct endorsements of the compromise the negotiators are seeking.

The meeting broke up yesterday evening without agreement but with tentative plans to meet again today.

Senate Majority Leader Howard H. Baker Jr. (R-Tenn.), reflecting the impatience many in Congress express about the prolonged standoff, said, "To tell you the truth, I think it really has gotten down to the Gaston and Alphonse stage. I think it's a question of who goes first."

But others in the discussions repeated their view that the substantive problems of reaching agreement are as formidable as the question of who will take credit or blame for the decisions that are made.

In midafternoon the president told an informal Rose Garden news conference that "It's my fervent plea . . . and hope that from these meetings there will soon come a balanced bipartisan package that will help to revive our economy. So long as we can reach a consensus of a budget plan that is balanced and commands bipartisan support, I'm personally prepared to go the extra mile."

A couple of hours later, O'Neill said the economic risks confronting the country in what he called "the Reagan recession" are "so bad it's our patriotic duty to sit down and hammer something out."

But tough obstacles remain. O'Neill reiterated his call for scrapping the third year of the Reagan tax cut, and Reagan said he would not accept that idea.

O'Neill said the president said nothing to him about trimming Social Security cost-of-living escalators, a key element in the compromise discussions, and "As long as he is glued on Social Security, I am the same way and my party will stay that way."

Despite the continued deadlock, efforts at a compromise were continuing, with Baker applying pressure through the public threat that Senate Republicans will start drafting their own budget later this week if there is no bipartisan agreement.

O'Neill said he will review the situation today with the House Democratic Steering and Policy Committee, and raised the possibility that the Democrats might come up with a budget alternative.

Democratic sources said their party's negotiators were sent to yesterday's White House meeting mainly to press the Republicans to lay out their proposal. That is what will be put before the steering and policy group today, they said.

Republican congressional leaders who met with Reagan during the morning said they were encouraged by Reagan's response to the package that leading legislators of both parties have been drafting with White House aides for three weeks.

Sen. Paul Laxalt (R-Nev.) said Reagan "has agreed to the conceptual framework of a compromise" aimed at lopping $400 billion off a deficit otherwise projected at over $600 billion for the next three years.

According to O'Neill, the conferees are aiming at a $94 billion to $95 billion deficit for fiscal 1983, and others said the targets are $70 billion in 1984, $40 billion in 1985 and a balance in 1986.

Laxalt and others said the package would include an income tax surcharge on wealthier individuals, some form of oil or energy tax, a freeze on discretionary domestic spending, a cap on cost-of-living increases in Social Security and other entitlement programs and some scaling back of Reagan's planned defense buildup.

Reagan told reporters that he would not "comment on the specifics" of the package "until they come with a consensus," but he left the impression that he would accept all of those elements, as long as his three-year tax cut program were intact.

Many Democrats have urged that the final 10 percent tax cut, scheduled for mid-1983, be scrapped to reduce the deficit.

But Reagan said "I have not changed" in his determination to preserve "that tax program of ours . . . the business tax cuts, the across-the board, three-year tax cuts in personal income tax."

Much of the day was spent in maneuvers by each side aimed at putting pressure on the other and convincing the public that the recalcitrance was in the opposition camp.

It began with a telephone call from Reagan to O'Neill, their first direct communication since it became clear in early February that the budget Reagan submitted for fiscal 1983 would not be approved by Congress.

In a discussion that avoided specifics, Reagan told O'Neill what he had told the Republican congressional leaders, that he would "go the extra mile" if there were a bipartisan agreement."

But O'Neill said he interpreted the call simply as an effort to "put the ball in my court," and White House aides conceded that the president's activities, from the call to the Rose Garden news session, were aimed at demonstrating his "flexibility" and putting pressure on Democrats.

House Minority Leader Robert H. Michel (R-Ill.) said that Rep. Richard Bolling (D-Mo.), who has been representing O'Neill in the negotiations, had said "very forcefully" that O'Neill might have trouble accepting some of the compromises negotiated by House Budget Committee Chairman James R. Jones (D-Okla.) and Ways and Means Committee Chairman Dan Rostenkowski (D-Ill.).

O'Neill's comments, later in the day, confirmed Michel's reading, and disappointed White House strategists.

O'Neill said that the president's call represented an overdue concession "that we need to change his economic program, that we need to reach some kind of compromise to get the economy moving again. For months, the president ignored our call. Instead of accepting the need to change his economic program, he looked for excuses, for alibis."

While Michel pointed to the differences within the House Democratic leadership as a source of problems, other GOP leadership sources said yesterday's White House meeting also produced fresh evidence of the strains within the GOP.

According to these sources, Rep. Jack Kemp (R-N.Y.), one of the original advocates of the three-year tax cut, upbraided Office of Management and Budget Director David A. Stockman and the chairman of the Council of Economic Advisers, Murray Weidenbaum, for their alleged readiness to compromise the president's program.

When Stockman denied that charge, Kemp reportedly said they should be fighting a surtax on upper-income individuals as strongly as they are trying to protect the third year of the tax cut.