In the latest turn of the regulatory revolving door, the chairman of the Commodity Future Trading Commission, William Bagley, quit yesterday and said he will join a Los Angeles law firm that plans to open a Washington office to handle - commodity matters.

The commission chairman took one of the agency's top regulators with him, Terry Classea, director of trading and markets, to run the Washington office to be opened by Bagley's law firm, Adams, Duque & Hazeltine.

Bagley will work on commodity matters in the Washington office part of the time but will live in California, where he will represent the firm's clients before the state legislature, of which he was a member for 14 years.

Bagley's transformation from regulator to regulatee and from legislator to lobbyist is business as usual and so is the method of filling his vacancy: House Speaker Thomas P (Tip) O'Neill Jr. (D-Mass.), who has already supplied the administration with several top appointees, has just the man for the job.

He is James M. Stone, the Massachusetts insurance commissioner, who will be out of a job Jan 20 because his boss, Gov. Michael S. Dukakis, lost his bid for renomination.

Stone 32, is no ordinary unemployed political protege. He is a Harvard PhD. a regulator in the Ralph Nader style, who is regarded as the scourge of the insurance industry. He says he believes insurance companies should be regulated to benefit the policyholders, not the stock-holders, and says Washington's Government Employes Insurance Co. should have been allowed to go broke when it got in financial trouble a couple of years back.

Stone refused to be interviewed about the commission post yesterday, but his top aide listened to the speculation and replied, "Be sure you get the middle initial right."

There are several other contenders for the $52,500-a-year-job, and Bagley said yesterday, "I expect the voters will nominate 20 or 30 more for it next Tuesday," by turning officehold-

The man the voters are perhaps most likely to interest in the commission job is Rep. Thomas S. Foley (D-Wash.), chairman of the House Agriculture Committee. Foley is behind in his bid for reelection, and his committee oversees the commodity trading agency.

Others said to be under consideration include former representative Jim Guy Tucker, who lost in the race for the Democratic nomination for the Senate in Arkansas.

Also interested in the post is Texas cotton man Robert Anderson, who commission officials say has been suggested by Democratic National Chairman John White.

There is already a Democratic cotton man in the agency: Commissioner Read P. Dunn Jr. Dunn's term expired several months ago, but the White House has made no move to replace him.

The last time President Carter picked a commission member he got into trouble. His choice was David Gartner, former top aide to the late Hubert H. Humphrey.

White House staffers checking Gartner's credentials neglected to notice that his children had received almost $70,000 in stock as a gift from the head of a major grain company. After the nomination was approved, farm state members of Congress complained about the gifts, and Carter asked Gartner to quit. Gartner defied the president and remains in office.

Bagley's term as chairman is not up for another 18 months, but after hanging around as the last surviving Republican agency head, he has finally submitted his resignation, effective Nov. 15.

Although labeled a windbag by Sen. Thomas F. Eagleton (D-Mo.), Bagley saw the new agency through its first reauthorization process this year, fending off efforts to have its jurisdiction reduced.