The Senate Agriculture Committee, meeting much of yesterday in closed sessions, hammered out farm-program spending cuts that would exceed the congressional deficit-reduction directive that it save $2.1 billion in costs in fiscal 1988 and 1989.

According to committee calculations, the new package would reduce federal spending by about $2.5 billion in the two-year period, with savings split about equally between this year and next.

"We think the leadership will like this . . . and we had representatives of the Agriculture Department with us, signing off on these ideas," said one source.

The budget-cutting targets were agreed upon earlier this month by President Reagan and the congressional leadership, with a suggestion to the Agriculture Committee that it achieve cuts by lopping "target price" subsidy payments by a flat 2 percent.

But farm-state legislators, fearing heavy political flak at home, refused to go along with a flat 2 percent reduction. The intense pressure to cut spending provoked hard feelings and some bitterness, less than two years after Congress had enacted general farm legislation that provided record subsidies for farmers.

"There is a rebellion against the system, we're seeing it in all of the committees," said Sen. David H. Pryor (D-Ark.). "We're seeing an offspring resulting from a shotgun wedding of the 1974 Budget Act and the Gramm-Rudman-Hollings budget-reduction legislation."

"It is a chaotic situation," Pryor said. "We're about to make some very bad decisions for farmers and rural America because there is a gun at our head. The leadership has drawn a box around us, with tight parameters. It is our own fault, but nobody's happy with it."

Key elements in yesterday's agreement included:

Two-year savings of $340 million by reducing the subsidy payments by one percent per year.

Savings of $135 million in the first year and $270 million in the second by cutting price support loan rates by one percent each year and reducing dairy and wool payments by the same amount.

An increase in the amount of land that feed-grain producers would be required to remove from production to receive federal aid. In turn, farmers would be allowed to grow soybeans on that land. The change would save $800 million in fiscal 1988 and $450 million the next year.

Savings of about $310 million through creation of a "whole-base bid" program that would pay farmers to remove entire farms from production. The agreement would limit the amount of acreage idled in each county to avoid disruption of service and supply businesses.

"We were trying to leave target prices alone because under the 1985 farm law, they will be cut 2 percent anyway this year," said Sen. John Melcher (D-Mont.). "We had to give away enough in the farm bill."

Agriculture Secretary Richard E. Lyng had said earlier this week that farmers could tolerate a 2 percent subsidy cut because their production costs had declined significantly in the last two years.

The 2 percent plan, for example, would have cut a wheat farmer's direct subsidy by about 9 cents, from the current $1.53 per bushel to around $1.44 -- a cut that Melcher called unacceptable.

Before yesterday's private meetings, Chairman Patrick J. Leahy (D-Vt.) had indicated that the committee could "buffer" itself from criticism by bowing to the leadership and accepting proposed across-the-board reductions.

"That didn't sit well with us," said another member. "We don't need the leadership deciding how these programs are going to operate."