House Majority Leader James C. Wright Jr. (D-Tex.) is set to announce, possibly this week, that he has lined up enough commitments from Democrats to become speaker in 1986, when House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) has said he will retire.

According to several Democrats, Wright has moved to preempt other candidates from running for speaker in two years by asking Democrats for commitments now. He has lined up "a comfortable majority" of the 251 House Democrats and may announce his number this week after he has talked to every Democrat, a Wright aide said yesterday.

O'Neill announced last year that he will retire after this term, and the race to replace him has been bubbling ever since. Wright, who is supported by O'Neill, has been viewed as the leading candidate for the speakership, provided the Democrats retain control of the House after the 1986 elections.

But there have been suggestions that he might face a challenge, either from a younger Democrat, such as Rep. Richard A. Gephardt (D-Mo.), or one of the powerful committee chairmen, such as Ways and Means Committee Chairman Dan Rostenkowski (D-Ill.), or a more liberal lawmaker.

To date, however, Wright has been the only one making a concerted effort to line up support for the post, Democratic members said yesterday.

Democrats who control the House Ways and Means Committee emerged from a private organizational meeting yesterday with four of the panel's six subcommittees having new chairmen.

The musical chairs started when Rep. J.J. (Jake) Pickle (D-Tex.) announced he wanted to give up his Social Security subcommittee and take over the oversight subcommittee. The committee agreed to that by a 12-to-9 vote.

Pickle's move meant that current oversight chairman, Rep. Charles B. Rangel (D-N.Y.), needed a new subcommittee. He was given select revenue measures, which until then had been chaired by Rep. Fortney H. (Pete) Stark Jr. (D-Calif.).

Stark, in turn, was given the health subcommittee, which had been chaired by Rep. Andrew Jacobs Jr. (D-Ind.). But Rep. James R. Jones (D-Okla.), returning to Ways and Means after relinquishing the chairmanship of the House Budget Committee, had wanted the health panel. In compensation he was given Pickle's Social Security subcommittee.

Jacobs, meanwhile, was left the odd man out when he chose not to bump Rep. Harold E. Ford (D-Tenn.) from the public assistance subcommittee. "Apparently he decided just to be a nice guy," one Democrat said.

Republican members of the House Judiciary Committee walked out of the panel's organizational meeting to protest what they said were Democratic efforts to stack subcommittees with Democrats.

Democrats control the full committee by a 6-to-4 ratio. But the Republicans said yesterday that five of the panel's seven subcommittees have five Democrats and only three Republican members. They want the party membership adjusted to reflect the full committee ratio and yesterday made a motion to alter the ratios. When the proposal was killed in a party-line vote, the Republicans walked out.

According to Rep. Daniel E. Lungren (R-Calif.), who offered the GOP proposal, the committee Republicans will meet with the House GOP leadership Thursday to decide on future action.

Committee Chairman Peter W. Rodino Jr. (D-N.J.) said yesterday's "staged walkout" was unproductive and occurred before any compromise could be worked out.

House Republican leaders agreed yesterday to try and force another vote Thursday on whether to seat Republican Richard McIntyre as the congressman from Indiana's 8th District.

In January, the Democratic-controlled House in a party-line vote refused to seat McIntyre, who had been certified the official winner by Indiana's GOP secretary of state.

Democrats charged that the certification was unfair and politically motivated and was done before a recount had been completed. They said Frank McCloskey, the Democrat who held the seat in the last Congress, had been the winner on election night and therefore had as much right -- or more -- to be seated as did McIntyre.

The matter has been turned over to the House Administration Committee for investigation.

But Republicans, with final recount figures showing McIntyre ahead by 418 votes, want another vote -- figuring that they will either get McIntyre seated or score political points against the Democrats. The Democrats have said the recount is not valid because many ballots were tossed out.

In the Senate, two Republicans had an easier time yesterday. The Senate Energy and Natural Resources Committee voted unanimously to endorse Donald P. Hodel, President Reagan's nominee to head the Interior Department, and John S. Herrington, Reagan's nominee to replace Hodel as head of the Energy Department.

House Speaker O'Neill has made good on a promise to increase the role of younger Democrats and conservatives in leadership decision-making.

This week he announced the members of what is being called the "speaker's cabinet," a new ad hoc panel composed of the entire leadership and six other lawmakers who span the generational and ideological ranks of the House. The six are Reps. Don Edwards (D-Calif.), Ed Jenkins (D-Ga.), Barbara A. Mikulski (D-Md.), John P. Murtha (D-Pa.), Buddy Roemer (D-La.) and Wes Watkins (D-Okla.)

The cabinet was set up in part to quell a mini-rebellion among younger Democrats, who after the November election had said that the party needed to change its image. Conservatives, who watched the GOP overrun the South in the presidential election, made the same case.