Oil prices edged higher on August 8, as a U.S. government agency projected a rosier outlook on the economy, but bearish data on China's crude imports and exports weighed.

Brent crude futures gained 83 cents to settle at $86.17 a barrel. U.S. West Texas Intermediate crude rose 98 cents to $82.92. Both contracts fell by $2 earlier in the session.

Prices reversed course on August 8 after a monthly report from the U.S. Energy Information Administration (EIA) projected GDP growth to rise by 1.9% in 2023, up from 1.5% in a previous forecast.

The EIA also expects Brent crude oil prices to average $86 in the second half of 2023, up about $7 from the previous forecast.

U.S. crude production is expected to rise by 850,000 barrels per day to record 12.76 million bbl/d in 2023, the report added, overtaking the last peak at 12.3 million bbl/d in 2019.

Crude prices have been rising since June, primarily because of extended voluntary cuts to Saudi Arabia's production as well as increasing global demand, the EIA said.

"We expect these factors will continue to reduce global oil inventories and put upward pressure on oil prices in the coming months," the EIA said.

Weighing on prices on August 8, however, China's July oil imports were down 18.8% from the previous month to the lowest daily rate since January, but still up 17% from a year earlier.

Overall, China's imports contracted by 12.4% in July, far steeper than the expected 5% drop. Exports fell by 14.5%, compared with a fall of 12.5% tipped by economists.

Despite the gloomy data, some analysts were still positive on China's fuel demand outlook for August to early October.

The peak season for construction and manufacturing activity starts in September and gasoline consumption should benefit from summer travel demand, said CMC Markets analyst Leon Li. Demand is expected to decrease gradually after October, he added.

Last week's decision by Saudi Arabia to extend a voluntary output cut of 1 million bbl/d into September, despite Brent rising above $80, suggested Riyadh might be targeting a higher price than $80, said Vivek Dhar, mining and energy commodities strategist at Commonwealth Bank of Australia.

Still, some analysts were sceptical about how much supply the cuts were actually taking off the market, as other members of OPEC such as Libya and Venezuela have increased production, said Andrew Lipow, president at Lipow Oil Associates in Houston.

"The production cuts have been far less than the announced quota cuts," Lipow said.

Investors are also awaiting weekly U.S. oil and fuel products inventory data.

Eight analysts polled by Reuters estimated on average that U.S. crude inventories rose by about 600,000 barrels in the week to Aug. 4. Industry data is due later on August 8, followed by the government's report on August 9.

"Overlapping, concentric and oppositional influences continue to bring nervousness to our market and oil prices will have to lean again on the state of world inventories to keep its winning ways," said John Evans, of oil broker PVM.