The Cubs agreed to terms with left-hander Danny Hultzen, the second overall pick in the 2011 draft who hasn’t pitched since 2016 after undergoing his second major arm surgery.

Hultzen, 28, spent last season rehabilitating his arm, completing his bachelor’s degree at Virginia, where he also served as a volunteer coach.

Hultzen will remain in minor-league camp with the Cubs as he embarks on his comeback bid, according to a source.

Hultzen signed with the Mariners out of Virginia for an $8.5 million contract that included a spot on the 40-man roster. He was 4-1 with a 2.05 ERA with 34 strikeouts in 30 2/3 innings at Triple-A Tacoma in 2013. But Hultzen underwent surgery after the season to repair damage in his rotator cuff, shoulder capsule and labrum.

Hultzen missed all of 2014 due to the surgery and tried to make a comeback in 2015. But he suffered recurring problems in 2016 after pitching two games for the Mariners’ Rookie team in Arizona and subsequently underwent another surgery.

Cubs minor-league pitching coordinator Terry Clark is familiar with Hultzen from their days in the Mariners system.

mgonzales@chicagotribune.com

Twitter @MDGonzales

Ben Zobrist details back stiffness; Cubs starting pitchers to make spring debuts next week »

Cubs infielder Javier Baez sets sights on winning Gold Glove »

Peter Bourjos eager to fulfill long shot dream with Cubs »