The Giants and Matt Cain have reached an agreement on a 5 year extension through 2017 with a clubvesting player option for 2018.