Measurements can be used in an optimization framework to compensate the effects of uncertainty in the form of model mismatch or process disturbances. Among the various options for input adaption, a promising approach consists of directly enforcing the necessary conditions of optimality (NCO) that include two parts, the active constraints and the sensitivities. In this paper, the variations of the NCO due to parametric uncertainty are studied and used to design appropriate adaptation laws. The inputs are separated into constraint-seeking and sensitivity-seeking directions depending on which part of the NCO they enforce. In addition, the directional influence of uncertainty is used to reduce the number of variables to adapt. The theoretical concepts are illustrated in simulation via the run-to-run optimization of a batch emulsion polymerization reactor.