The Reagan administration, contending that a recent pro-environmental court ruling clouded the legality of the federal wilderness program, yesterday reopened consideration of whether to allow development in 29 million acres of wild forests in 30 states.

Assistant Agriculture Secretary John B. Crowell Jr. said the ruling forces the government to discard the results of a lengthy Carter administration study, which recommended protecting 7 million acres of the forests as wilderness areas and opening the rest to lumbering and other development.

He said the Reagan administration will embark on its own study, reviewing the status of wild forests from Florida's Osceola to California's Sierra. That could cost as much as $30 million and last as long as two years.

Meanwhile, he said, the government will protect the 7 million acres of wild forests recommended for the federal wilderness system and allow mining, timber-cutting and energy development in the others.

"Admittedly, there is a logical inconsistency in allowing activities to proceed in some areas that we simultaneously are reviewing for possible wilderness designation," Crowell said. But he added: "We do not want this reevaluation to precipitate a crisis or to cause job losses in the affected communities."

The decision immediately came under attack from environmentalists and from wilderness advocates in Congress, who said the administration had misinterpreted the court ruling and was using it to wage what Rep. John F. Seiberling (D-Ohio) called "a broadside attack on the nation's wilderness heritage."

Yesterday's move was the latest in a prolonged and divisive debate on the status of millions of acres of roadless national forests that Congress has not voted to include in the federal wilderness system, a designation that would make them off-limits to development.

After a nationwide two-year review, the Carter administration recommended in 1979 that 15.5 million acres of roadless forests be added to the federal wilderness system and that 36 million be opened to development. The study called for further review of 10.5 million acres.

Acting on those proposals, Congress has voted to designate new wilderness areas in Alaska, Colorado, New Mexico, Missouri, Indiana and West Virginia. But about 29 million acres of wild forests in 30 states remain in limbo while Congress debates whether the Carter recommendations went too far or not far enough.

The Reagan administration, backed by the timber industry, has argued that this debate "locks" up potentially valuable forests that could be cut and sold, while environmentalists contend that the government simply "wants to cut every single tree," as Rep. James Weaver (D-Ore.) put it.

In the California case, state officials successfully argued that the recommendation for 1.3 million acres of wilderness was too small and persuaded the court to protect an additional 1 million acres of wild forests on grounds that the government had failed to assess the full environmental impact of opening them to development.

The decision was recently upheld by the 9th U.S. Circuit Court of Appeals and so could be invoked to force protection of more wild forests in Oregon and Washington, which are highly valued by the timber industry, several officials said.

Seiberling and Weaver said that the ruling applies only to forests recommended for development. The court said it found no fault with portions of the environmental impact statement that called for protecting forests.

Crowell acknowledged that the administration is "going well beyond what the court said" in discarding all of the Carter recommendations, those proposing wilderness protections and those proposing development. But he said he feared the ruling jeopardized both.