The Reagan administration yesterday reaffirmed its decision to close a downtown Washington shelter for the homeless and recommended that its 800 residents be out by Aug. 31, even though it is unclear where they would go.

The recommendation by Charles D. Baker, undersecretary of the Department of Health and Human Services, is in a 29-page memorandum sent to U.S. District Judge Charles R. Richey. Last month Richey told HHS officials to reconsider their decision to close, rather than renovate, the shelter at 425 Second St. NW and ordered them to submit a "reasoned analysis" of their proposed action by noon yesterday.

The activist Community for Creative Non-Violence, which operates the shelter, has sued the administration in an attempt to keep the decaying building open and force federal officials to transform it into the "model" President Reagan promised on the eve of last November's presidential election.

This summer, federal officials announced they were dissolving the unusual and often uneasy alliance with CCNV and planned to close the shelter and help relocate its residents. At the time HHS officials said they probably would give the District government at least $2.7 million to develop new facilities. City officials, who were excluded from the deal CCNV made with Reagan last fall, have said it would cost about $9 million for one year to operate shelters for 800 people. The city has refused to state what if any relocation plans it has developed.

"The absence of the District government in the federal government's response is staggering," said CCNV attorney Florence Roisman, who said she was "outraged but not surprised" by the HHS decision. "The federal government seems to think that they can make the decision to close the shelter first and then the alternatives will magically appear," she said.

"The CCNV shelter is not, and has never been, our responsibility," said Kathy Williams, a spokesman for the city. "Our continuing position on this is that this is an arrangement between the federal government and CCNV," she said. "We do not have any estimate of how many of those people would be coming to us, but if they do seek shelter, the city, in cooperation with private, nonprofit agencies, would be prepared to try and provide assistance."

Federal authorities said that if the District does not devise a contingency plan, they might give the $2.7 million to the Coalition for the Homeless, a nonprofit group that has fought bitterly with CCNV. The coalition submitted a 12-page memo to Richey as part of the federal response and said it might be able to convince the District government to give up abandoned buildings and renovate them for use as small shelters.

The coalition staff could not be reached for comment yesterday. However, even if the District agreed to such a plan, rehabilitation work likely would take more than a year.

Two congressional subcommittees are scheduled to hold a joint hearing this morning on a bill sponsored by Rep. Kenneth J. Gray (D-Ill.) that would authorize the General Services Administration to make $10 million worth of renovations to the shelter, located two blocks from the Capitol in a "temporary" building constructed during World War II.

Contained in the report to Richey are statements by a team of public health inspectors who toured the facility last week. They said rehabilitation of the building, which has an "overwhelming" infestation of cockroaches, was not feasible because it is so deteriorated that adequate cleaning is "impossible."

Submitted as part of the government's response were letters and telegrams, most of which opposed closing the shelter. The next hearing in the case is scheduled for tomorrow.