An open end 7/8“ wrench or crescent wrench will be sufficient to remove / install the O2 sensor. 1)
However, the tools below will make it a little easier.
Box end 7/8” with a section cut out to clear the wire. 2) | 7/8“ deep well 6 point socket with a side milled out to clear the wire 3) |