When John Clyde Foster, dressed in a three-piece black suit, passed Det. James W. Henderson in a hallway at D.C. Superior Court Tuesday morning, the two men shook hands and talked like old friends. But their acquaintance was strictly professional.

Yesterday morning, Henderson, an investigator with the D.C. police auto theft unit, returned to Superior Court to see Foster, who described his work in the court as supervision of defendants released from custody prior to trial.

This time, according to Henderson, the men exchanged a few words; Foster said, "Okay, you got me," and Henderson took him to a nearby men's room, where he searhced and handcuffed Foster before taking him to police headquarters.

Between their two encounters this week, Henderson said, "I got to thinking."

Two years ago, Henderson said he helped investigate a major auto insurance fraud scheme that led to Foster's conviction in February 1977 for mail and wire fraud. Foster was sentenced to serve 20 months to five years in prison, according to the U.S. attorney's office.

At their meeting Tuesday, Henderson said, Foster told him he had been paroled in July. But, Henderson said yesterday, that time totaled only 16 months in prison.

After checking the nationwide police computer and with the FBI., Henderson said, he learned Tuesday that Foster, 41, had received a two-day Thanksgiving furlough last year from the federal penitentiary at Petersburg, Va Since then a warrant has been on file charging Foster with escaping from Prison.

Foster was arraigned in U.S. District Court late yesterday and is being held on a $5,000 bond.