In announcing his retirement, Judge Kozinski suggested that he had been misunderstood and apologized.

“I’ve always had a broad sense of humor and a candid way of speaking to both male and female law clerks alike,” he wrote. “In doing so, I may not have been mindful enough of the special challenges and pressures that women face in the workplace.”

Chief Justice Roberts said he had assembled a task force to examine whether the court system’s procedures for addressing inappropriate conduct were adequate. The young lawyers who serve as law clerks to judges, typically for a year soon after graduating from law school, may require special attention, he suggested, as they are meant to keep confidential what happens in their judge’s chambers.

“I expect the working group to consider whether changes are needed in our codes of conduct, our guidance to employees — including law clerks — on issues of confidentiality and reporting of instances of misconduct, our educational programs, and our rules for investigating and processing misconduct complaints,” Chief Justice Roberts wrote.

“These concerns warrant serious attention from all quarters of the judicial branch,” he added. “I have great confidence in the men and women who comprise our judiciary. I am sure that the overwhelming number have no tolerance for harassment and share the view that victims must have clear and immediate recourse to effective remedies.”