Cueto has been sidelined since May 1 with a strained right elbow. Samardzija has been out since May 30 with tightness in his right shoulder.
With Cueto returning, Derek Holland will move to the bullpen, Bochy said. Dereck Rodriguez, who was to be Thursday's starter, will start Friday instead.
Cueto, who is 3-0 with an 0.84 ERA in five starts this season, pitched 7 2/3 scoreless innings in two rehab appearances at Triple-A Sacramento. Samardzija, 1-4 with a 6.56 ERA in eight starts, was hit hard in two rehab starts, going 0-2 with a 7.32 ERA. He allowed six home runs.
Holland is 5-7 with a 4.36 ERA in 17 starts this season.