The judge in the A.H. Robins Co. bankruptcy, in a surprise move yesterday, recommended that the two top officers resign from their family-controlled firm because of a conflict of interest.

If Chairman E. Claiborne Robins and President E. Claiborne Robins Jr. don't resign by this morning, an unspecified appropriate action will be taken, U.S. District Judge Robert R. Merhige Jr. warned the father and son at a court hearing.

Company spokesman Roscoe E. Puckett Jr. said last night that there had been no resignations and that there were efforts to resolve the matter.

The issue grew out of the planned merger of the 121-year-old company with another pharmaceutical firm, Rorer Group Inc. Robins' pending financial reorganization plan, which assumes completion of the merger, would create two trust funds to pay victims of the Dalkon Shield, the defective birth-control device Robins sold in the 1970s, and to indemnify persons, including officers and directors, who may be jointly liable with the company to claimants.

The Robins board agreed orally to the merger on July 31, but the question of whether there was a hitch was raised at a recent hearing.

It turned out that Robins Sr. and Jr. had not signed the shareholders' agreement, although their signatures on the document are required for the merger to go through.

On Tuesday, President Robins was subpoenaed to appear in court for yesterday's hearing.

The explanation came from Ralph R. Mabey, the examiner in the case. He told the court that the issue in dispute arose from a provision of the plan barring any Dalkon Shield victim, after being compensated, from suing officers or directors personally for acts committed in connection with the device and to indemnify them if they are sued.

Because of the possibility that the provision might not survive a legal challenge, Mabey said, the two officers want to be free to sell the large blocks of Rorer shares they would acquire to pay for defense against such lawsuits, or to be released from liability.

However, the shareholder agreement with Rorer would bar the two Robins officers from either selling or voting their shares unless the Rorer board directs them to do so.

Merhige said there was a conflict of interest in that an issue exclusively involving personal finances was holding up the entire reorganization.

Although the subpoena did not name the elder Robins, he joined his son in court, with Neal Batson of Atlanta representing them both. Robins Sr. has testified in depositions, but this was believed to be his first courtroom appearance in connection with any aspect of Dalkon Shield litigation, which dates back at least to 1974.

Batson proposed that the chairman, who is 76, be allowed to testify about his wish for the merger, but not be subjected to cross-examination because he has had two heart attacks. Merhige declined the plea, heard no testimony, listened to Batson's argument, and finally recommended the resignations.

The unspecified action could include appointment of a trustee to run the company, although Merhige has vehemently refused up to now to take such a step.