The person spoke Wednesday on condition of anonymity because the team had not made an announcement.
Pena, the son of former Boston catcher Tony Pena, became a full-time pitcher last season after playing shortstop with the Atlanta Braves and Kansas City Royals. Last season he was in the San Francisco Giants system. He pitched in 53 games, all in relief, at Double-A Richmond, where he had a 2.35 ERA, and Triple-A Fresno, where his ERA was 6.60.
In 2007, Pena played 152 games for Kansas City with a .267 batting average and .284 on-base percentage.
The agreement was first reported by ESPN.com.
Ramirez gives the Red Sox insurance behind catchers Jarrod Saltalamacchia and Jason Varitek. Ramirez hit .217 with two homers and eight RBI for Texas last season. He spent much of the year with the Rangers' Triple-A team at Oklahoma City, where he batted .286 with three homers and 29 RBI in 56 games.
The Red Sox worked out a trade to acquire Ramirez from Texas in December 2009 but it fell through because Boston third baseman Mike Lowell needed thumb surgery.
Fox allowed two earned runs in 1 2/3 innings for Boston after being claimed off waivers from the Minnesota Twins on Sept. 9.