Capt. Tom Gresback of the Navy, the spokesman for American forces in Afghanistan, defended the decision to classify the information, saying that it was done at the Afghan government’s request.
Mr. Sopko said: “The government usually doesn’t classify good news. I don’t want any nameless, faceless Afghan bureaucrat telling the American taxpayer what they ought to know.”
The information has been classified only once before, in 2015, as the Obama administration was trying to portray the war in Afghanistan as all but over. At the time, as Taliban militants surged across the country, officials said that the figures, if made public, could endanger Afghan and American lives.
While the quarterly reports have had a classified annex since 2015, most of the data categories redacted in the latest release have been available to the public since the inspector general started putting out the reports in 2008.
This time, the numbers were kept secret as Mr. Trump ramps up the conflict, authorizing the deployment of thousands more troops and an expanded C.I.A. paramilitary campaign as well as overseeing a volume of airstrikes not seen since 2012.
Mr. Sopko’s report includes nine questions — answered publicly in the past — that have now been redacted, including the exact number of Afghan forces serving.
The number of combat casualties among the Afghan military and police, the primary forces battling Taliban and Islamic State militants in the country, were also classified.
The total is one of the clearest indications of the ferocity of the war. From the beginning of the year through May 8, 2,531 members of the Afghan security forces were killed and 4,238 wounded, Mr. Sopko’s report in July said, adding that the Pentagon said Afghan casualties have “steadily increased.”
That compares with more than 6,700 deaths among the Afghan security forces for all last year and around 12,000 wounded.
The death tolls could hurt the morale of the troops and police as well as the government’s efforts to recruit for the roughly 330,000-member force. Long a problem for the Afghan army, the average attrition rate dropped from January to March, according to the previous inspector general report.
In April, the equipment readiness for the six Afghan Corps — the largest organizational unit in the Afghan military at about 18,000 troops — ranged from 42 to 86 percent.
The numbers are important bellwethers for the 16-year war effort, one that has been marked by military setbacks and a Taliban militancy that has held on — and even gained ground — despite the group’s technological disadvantage.
It is unclear whether the American military will move to classify more information in future reports, said Mr. Sopko, as some of the redactions in the October report seemed arbitrary.
“If they start classifying this stuff now, what are they going to do next month?” Mr. Sopko asked. “It’s a slippery slope.”