The House Ways and Means Committee yesterday agreed to sharp cutbacks in a widely used tax break for retirement.

Panel members voted to curtail popular 401 (k) savings plans, and to alter employer-provided retirement plans in a way that could reduce benefits for some upper-income retirees.

They also rejected, by a 22-to-14 vote, President Reagan's proposal to let nonworking spouses defer taxes on $2,000 placed in an individual retirement account, as workers can do. Instead, they retained the current limit of $250 for an IRA for a nonworking spouse.

The retirement changes would raise $18 billion in revenue over five years compared with the current tax code, $4 billion less than Reagan had wanted and $2 billion less than Ways and Means Committee Chairman Dan Rostenkowski (D-Ill.) had recommended.

Earlier, the committee closed a tax break that lets construction and defense contractors delay payment of taxes, but retained another provision that gives a similar preference to lawyers, accountants and other professionals.

The committee accepted the recommendation of a six-member task force and agreed to repeal most uses of the so-called completed contract method, which allows companies engaged in contracts lasting more than two years to defer taxes on all income until the entire contract is finished. This accounting method makes it possible for many defense contractors to pay little or no taxes during times when they are expanding their contracts.

Rostenkowski had proposed requiring contractors to pay taxes on a share of income proportional to the amount of work completed each year, but the panel did not go that far. An amendment proposed by Rep. Ed Jenkins (D-Ga.) would retain the completed-contract deferral for companies with sales of less than $10 million and with contracts of between one and two years' duration.

Reagan had proposed requiring companies to defer taking deductions for certain costs until after the contract is completed, but did not ask to do away with the completed-contract method. A committee aide said the panel's package is "considerably tougher" on defense contractors than the president's plan.

The Reagan proposal would have raised $6.2 billion in revenue compared with the current code. Rostenkowski's plan would have raised $15.9 billion, and the committee package would raise $14.4 billion.

Reagan and Rostenkowski also had proposed restricting use of a similar accounting method that now lets lawyers, accountants, lobbyists and other professional firms deduct expenses as they are paid even if the income related to those expenses is received -- and taxed -- in a later year. Professionals in firms with receipts of over $5 million would have been required to switch to the so-called "accrual" accounting method, under which expenses and income are both considered realized when the service to which they are related is performed.

The committee accepted a proposal by its task force to exempt individuals, professional service corporations, partnerships and businesses that pay taxes at personal rates from the requirement. That lets out most of the firms that would have been affected.

Altogether, the accounting changes would raise $60.5 billion over five years, about $4 billion less than Rostenkowski had proposed. Ways and Means ended a long day of work about $21 billion under where it should be if tax revision is to remain "revenue-neutral."

The 401 (k) plans, named after the relevant section of the tax code, are used by an estimated 12 million Americans to save for retirement and other purposes while delaying taxes on the money -- now limited to $30,000 per year -- they put into the plan on a tax-deferred basis. The proposal would limit amounts that can be contributed to those plans without paying taxes on the money to $7,000 per year or $5,000 if the taxpayer also puts the maximum $2,000 in an IRA.

The task force proposal did retain 401 (k) plans for state and local government entities that already have them in place and for unprofitable companies, a compromise from what Rostenkowski had initially suggested.

The committee also agreed to decrease from $90,000 a year to $77,000 the eventual benefit workers can receive from standard employer-provided retirement plans.