Third baseman Pablo Sandoval has agreed to a minor league deal to remain with the San Francisco Giants.