Undated (AP) _ Housing starts declined 0.8 percent in June, the second consecutive monthly decline, but construction for the first half of 1986 still remained ahead of last year's pace, the government said today.

The Commerce Department said that new homes and apartments were built at an annual rate of 1.85 million units last month after a decline of 7.9 percent in May.

Even with the two consecutive setbacks, however, housing construction for the first half of the year is running 9 percent ahead of the pace in 1985.

On Wednesday, the economy showed more signs of weakness as the government reported industry operated at 78.3 percent of capacity in June, the slowest pace in three years, and business sales slumped 1.8 percent in May.

Oil and stock prices rebounded, however.

On the New York Mercantile Exchange, contracts for August delivery of West Texas Intermediate, the benchmark U.S. crude, closed at $12.58 a barrel, up from Tuesday's close of $12.11.

Unleaded gasoline rose to 35.46 cents from Tuesday's 34.11-cent close, and home-heating oil rose to 35.12 cents from 32.92 cents per gallon Tuesday.

On Wall Street, the Dow Jones average of 30 industrial stocks steadied from its steep slide over the past eight sessions, ending with a gain of 5.48 points, at 1,774.18.

The Federal Reserve Board reported Wednesday that the factory operating rate plunged by a sharp 0.6 percentage point in June from 79.2 percent in May, leaving the production rate at its lowest level since November 1983.

The operating rate at the nation's factories, mines and utilities has fallen by 2.5 percent since the beginning of this year.

The decline underscores the weakness in manufacturing, which has suffered for the past two years from the nation's growing trade deficit, analaysts said.

The largest decline was seen in the operating rate at metal factories, and was blamed on continued weakness in the steel industry and a strike against Aluminum Co. of America.

In a separate report Wednesday, the Commerce Department said business sales plunged 1.8 percent in May, the biggest decline in 11 years, while business inventories fell by 0.3 percent.

Sales totaled $420.7 billion in May, $7.7 billion below the April level, the department said. It was the largest one-month decline since a record 2.8 percent plunge in March 1975.

With sales slumping, businesses also worked to reduce stockpiles, pushing inventories down. The May decline represented the biggest fall since a 0.6 percent drop in March 1983, the government said.

In other economic developments Wednesday, Senate Majority Leader Bob Dole said the Reagan administration appears willing to offer grain export subsidies to the Soviet Union to bolster sagging U.S. farm sales overseas and to boost chances of a Reagan-Gorbachev summit.