Climate change affects agricultural productivity through nonlinear and seasonally structured responses to temperature and precipitation. Global agricultural total factor productivity (TFP) attribution is commonly represented with a quadratic response to growing-season mean temperature and precipitation. We compare that benchmark with an expanded quadratic model and a Random Forest model using annual TFP growth for 168 countries, agricultural-area-weighted CRU TS observations, and eleven paired CMIP6 simulations with and without anthropogenic forcing. Under five-fold country-grouped cross-validation, the Random Forest shows higher out-of-sample predictive performance than either quadratic specification. Placebo reshuffling produces null R² distributions far below the observed value, while a year-by-region block bootstrap gives an average warming sensitivity near -0.9 percentage points of annual TFP growth per 1 °C. Held-out SHAP shows that precipitation, maximum temperature, and three-month climate windows contribute strongly to prediction, while accumulated local effects reveal nonlinear and direction-sensitive responses to year-to-year climate changes. Historical global attribution remains similar under the two response forms: the baseline quadratic gives -22.1% and the Random Forest -20.9% over 1962-2020. This agreement strengthens the finding that anthropogenic climate change has substantially reduced global agricultural productivity, while showing that a more flexible machine-learning response can reveal richer seasonal and nonlinear climate-TFP relationships. At the country level, attributed impacts are more dynamic and vary across rainfall-based moisture quintiles, with the Random Forest tending to attribute smaller losses than the quadratic in drier countries and larger losses in wetter countries.