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