An AP reporter recently asked this exact question in a brief article. As she states, "the answer partly depends on what you see as the real motive behind the director’s firing."
Sen. Al Franken is a prominent example of someone who sees a contradiction. As quoted on The Hill:
“I am also deeply troubled by the fact that Attorney General Jeff
Sessions, who pledged to recuse himself from the Russia investigation
because of his own Russia connections, involved himself in Director
Comey’s firing,” Franken said in a statement. “This is a complete
betrayal of his commitment to the public that he wouldn’t be involved
in the investigation.”
Also Sen. Ron Wyden, as quoted on Huffington Post:
“I urge people to compare the statement that the attorney general made
with respect to recusal to the events of the last day or so, with the
president of the United States specifically mentioning in connection
with those letters, the investigation of Russia. I think it showed a
blatant disregard for the commitment to recuse himself,” Wyden said.
HuffPo further quotes a legal scholar who thinks there is a legitimate case here:
Stephen Gillers, a New York University School of Law professor
specializing in legal ethics, said Sessions “reneged on his recusal
promise to the Senate,” pointing to Sessions’ statement from March: “I
have decided to recuse myself from any existing or future
investigations of any matters related in any way to the campaigns for
President of the United States.”
“That’s ‘campaigns’ plural,” Gillers said. “The grounds for firing Mr.
Comey in the Rosenstein memorandum are explicitly stated to be Mr.
Comey’s public comments about Mrs. Clinton during the campaigns. These
grounds are plainly encompassed within Mr. Sessions’ description of
the broad scope of his recusal.”
But the AP piece includes a dissenting opinion:
Sessions recommended Comey’s firing, writing in a letter that “a fresh
start is needed at the leadership of the FBI.” And President Donald
Trump said he based the firing on Comey’s very public handling of the
bureau’s investigation into Clinton’s emails.
In that context, the move can be seen as purely a personnel decision based on
Comey’s conduct, and Sessions should have been involved given his job as
attorney general, said Susan Hennessey, a fellow at the Brookings
Institution and managing editor of the Lawfare blog.
There’s no legal penalty for Sessions if he should have stayed out of the firing, though Congress could grill him over it or seek an inspector general investigation, Hennessey said.