Manaea has the right to opt out after this season and become a free agent next fall.
Manaea gets a $5 million signing bonus, half on March 15 in both 2023 and '24, and salaries of $7.5 million next season and $12.5 million in 2024. He has the right to opt out after this season and become a free agent next fall.
The 30-year-old Manaea, who spent his first six major league seasons with the Oakland Athletics, went 8-9 with a 4.96 ERA over 30 appearances with 28 starts and 158 innings in his lone campaign with the San Diego Padres and former A's manager Bob Melvin this year.
San Francisco finished 81-81 for third place in the NL West after a franchise-best 107 wins and a division title in 2021 before losing the best-of-five NL Division Series in five games to the rival Dodgers.
Outfielder Mitch Haniger agreed on a $43.5 million, three-year contract with the Giants last Tuesday at the winter meetings and outfielder Joc Pederson accepted a $19.65 million, one-year qualifying offer from the Giants last month.
The New York Post first reported the Manaea agreement.
Information from The Associated Press was used in this report.