Tim Lincecum is staying put with the San Francisco Giants just as he hoped, reaching agreement Tuesday on a $35 million, two-year contract through the 2015 season.