WASHINGTON — Hundreds of pages of previously classified C.I.A. cables and reports released Friday by the Trump administration shed some new light on Lee Harvey Oswald’s mysterious visits to the Soviet and Cuban Embassies in Mexico City weeks before John F. Kennedy’s assassination.

Far from suggesting that Mr. Oswald was a steely, coldblooded agent of either communist country, the documents describe the befuddlement of officials at the embassies who were overheard on intercepted calls trying to make sense of Oswald’s “poor Spanish” and “broken” Russian.

The C.I.A. station in Mexico City kept close tabs on the Soviet Embassy, using “multi-line phone taps, three photographic sites, a mobile surveillance team and a mail intercept operation,” one document said.

But a rushed examination of the surveillance files after Kennedy’s death appears to have turned up little of interest. Instead, officials found themselves chasing phantoms: a Nicaraguan who had seen Oswald being paid for the assassination — on a day when Oswald was not in Mexico — and an intercepted call between two Cubans in Mexico City and Miami. In the call, one made a dubious claim: “Plan of Castro carried forward; Bobby is next,” referring to Fidel Castro, the Cuban leader, and Robert F. Kennedy, the president’s brother.