Leaders of Poland's independent trade union movement, Solidarity, reached a compromise agreement with the government early this morning on two of three key issues that have caused the most widespread industrial unrest since last summer's strikes, a union spokesman said.

After 12 hours of difficult negotiations in Warsaw, the two sides reached agreement on their long dispute about a five-day work week and on access to the news media for the independent labor movement.

Nevertheless, there was no reported progress on the third dispute -- official recognition of an independent union representing Poland's 3 million private farmers.

The two sides agreed that during 1981, every fourth Saturday will be a six hour working day "because of the grave economic situation," union spokesman Jan Rulewski told reporters. Workers would have the other three Saturdays free each month.

Solidarity negotiators also won a government promise that state radio and television would feature weekly programs on the union's work, Rulewski said.

The talks could break down on the third point, however. In an interview on Polish television, Solidarity leader Lech Walesa said yesterday that unless all three issues are settled "as a package," the union will go ahead with plans for nationwide strikes next month.

Poland's communist authorities have also threatened to take emergency measures unless there is a respite in the wave of industrial unrest now sweeping the country. A strongly worded government statement issued Thursday night was backed up yesterday by a warming that protestors may be subject to legal action, including imprisonment.

Despite the official warnings and an appeal by Solidarity's leadership for a temporary ban on strikes, several parts of the country remained in the grips of industrial unrest. Workers in the southern town of Bielsko Biala, who are demanding the dismissal of "repressive" local Communist Party officials, voted Thursday night to continue their general strike into the fourth day.

Solidarity members in the western city of Zielona Gora also went ahead with a general strike in the region over local and national grievances. The only plants not affected were vital industries such as electricity and coal.

In the southeastern town of Rzeszow, however, farmers ended their occupation of local administrative offices pending the outcome of the talks in Warsaw.

Outside of the preliminary announcement of the agreement on Saturday work and media access, few details emerged about the course of the negotiations between a 13-member Solidarity team led by Walesa and the government side led by Premier Jozef Pinkowski.

It was the government's failure to introduce a 40-hour week by Jan. 1, as Solidarity says it had promised, that sparked the present strikes. But virtually all political analysts agree that the real cause of the crisis is much more complex. It concerns the relationship between Solidarity and the communist authorities -- and the role of independent unions in a one-party state.

A leading Polish commentator, Jerzy Urban, wrote in the weekly Polityka: "Only naive observers could think that the present dispute arises out of the issue of free Saturdays. In fact, it is a struggle about power -- and free Saturdays is a kind of costume being used to dress up the arguments." a

Solidarity officials claim that the initial government decision to allow two free Saturdays a month instead of four was made without consultation. Negotiations over a possible compromise broke down and Solidarity urged its members simply not to work on Saturdays.

The result was a test of strength which Solidarity appears to have won -- although widely differing figures have been given for the extent of absenteeism on the two designated "working" Saturdays this month. The impression of a Solidarity victory on points was reinforced by the skillful performance of union spokesman during an unprecedented televised debate earlier this week with government representatives.

According to an opinion poll organized by Solidarity, 81 percent of the viewers found the nation's arguments "more convincing" than the government's. Even allowing for the pollsters' built-in bias, this would appear to be a reasonably accurate reflection of public opinion.

Particularly worrying to the communist officials is their general lack of credibility, even on occasions when they are in the right. As a television commentator giving the official view point remarked last night: "The problem is not that the government is lacking in valid arguments -- but that nobody listens to it any more."

The credibility gap was reflected by low-key public reaction to the government statement hinting at the possible use of force to end "chaos and anarchy" in the country. The stock response of Solidarity officials: "They've tried to frighten us like this before. It's just another bargaining tactic."

Apparently in order to strengthen the warning, the prosecutor general reminded strikers yesterday that in many cases they were breaking the laws and could be sent to prison. A statement singled out the occupation of public buildings, the harrassment and slander of public officials, and the picketing of factories as punishable offenses.