The White House said yesterday that President Reagan's national security affairs adviser, John M. Poindexter, endorsed in advance a warning to journalists to limit their reporting on intelligence matters revealed in an espionage trial this week to details the government chooses to disclose in the courtroom.

The warning, which has drawn increasing criticism from journalists and First Amendment specialists, was issued Wednesday by William J. Casey, director of the Central Intelligence Agency, and Lt. Gen. William E. Odom, director of the National Security Agency.

Casey and Odom, in an interview with the Associated Press yesterday, accused the news media of becoming hysterical about the statement, and said they have no intention of harming freedom of the press.

Their Wednesday statement, which followed publication of stories about the first day of the trial of Ronald W. Pelton in Baltimore, "cautioned" reporters "against speculation and reporting details beyond the information actually released at trial. Such speculations and additional facts are not authorized disclosures and may cause substantial harm to national security."

"We are in full agreement with the thrust of the statement," White House spokesman Edward Djerejian said yesterday.

Djerejian, who said that Poindexter had endorsed the warning, said, "I think what the statement said was that speculation and reporting details beyond the information that has actually been released at trial should be considered very, very carefully."

Broadcast network and newspaper officials said yesterday that the statement was viewed largely as unnecessary meddling by Casey, who has been campaigning in recent weeks to stop news organizations, including The Washington Post, from publishing details of intelligence information that former NSA worker Pelton allegedy gave the Soviets.

"We try very hard not to tell Mr. Casey how to catch spies," said "CBS Evening News" anchor Dan Rather, "and I hope he'll understand that we're not going to take it too seriously when he tells us how to cover trials.

"The only position for a journalist in this case must be one of respectful defiance," Rather said.

There were unconfirmed reports yesterday that Casey had been planning to hold a news conference. Instead, Casey and Odom gave the Associated Press an exclusive interview, which Casey's deputy Robert M. Gates said was designed to "lower the noise level, turn down the volume and have a serious dialogue."

"We haven't made ourselves always as clear as we might be," Casey told the AP. "And I think that certainly the press has been very hysterical about the thing, saying we're trying to tear up the First Amendment and scuttle the freedom of the press. We're not trying to do that."

Odom told the AP that they were concerned because of "a series of recent signals intelligence [electronics and radio intercepts] leaks over the last six months . . . the most serious we can remember in a long, long time."

Casey added that "every method we have of obtaining intelligence: our agents, our relationships with other intelligence services, our photographic, our electronic, our communications capabilities, have been damaged . . . . This is costing the taxpayers billions and billions of dollars, and, more importantly, Americans' and our national security are at risk. We can't permit this to continue."

Casey and Gates told AP's Michael Sniffen that some agents had not been heard from following disclosures in this country, but they declined to provide details.

A senior White House official said that Wednesday's statement was written by Odom, who had been working with lawyers to determine what could be used in the courtroom. It was approved by Casey and then endorsed by Poindexter, believed to be one White House official most likely to agree with the statement. The official said that the advice to the media was not preapproved either by President Reagan or chief of staff Donald T. Regan.

A draft of the statement, which was released Wednesday to many public information officers in the government, included a final sentence that was deleted from the official release. The line admonished journalists that unless they followed the guidelines, they could be subject to prosecution under a 1950 law that prohibits publication of classified information about communications activities or code-breaking.

Odom said in the AP interview yesterday that he would recommend prosecution of journalists with "the greatest reluctance." However, the intelligence community has already recommended prosecution of NBC for an advance story on the Pelton trial that basically repeated an NBC broadcast last fall on the same subject.

First Amendment lawyer Floyd Abrams and others suggested that the use of the word "speculations" seemed to embrace far more than any of Casey's previous warnings and more into the area of analysis of the trial.

"I really don't mind when he [Casey] tries to persuade The Post and other publications not to publish something. That is . . . his job. The difficulty is when urgings turn into warnings and the warnings are then expanded to cover the most routine of journalistic endeavors," Abrams said.

"The notion that one cannot speculate, either the press or the public, without the authorization of the government is a repugnant notion," said Lawrence K. Grossman, president of NBC News.

Grossman, who said that the press in this country is generally "very conscious" about national security, said that Casey's warning will not affect their coverage of the trial.

"If I had it to do over again, I might not use that word," Casey said of the word "speculation." "I might use extrapolation."