The San Francisco Giants have agreed to a $23 million, two-year contract with Tim Hudson, who began his career with Oakland. Hudson had a physical Monday, and the team said the deal is pending the results of that examination.