Maintaining or shifting between behavioral states according to context is essential for animals to implement fitness-promoting strategies. How integration of internal state, past experience and sensory inputs orchestrate persistent multidimensional behavior changes remains poorly understood. Here, we show that C. elegans integrates food availability and environment temperature over different timescales to engage in persistent dwelling, scanning, global or glocal search strategies matching thermoregulatory and feeding needs. Transition between states, in each case, requires lifting multiple regulatory gates including AFD or FLP tonic sensory neurons activity, neuropeptide expression and downstream circuit responsiveness. State-specific FLP-6 or FLP-5 neuropeptide signaling acts on a distributed set of inhibitory receptors to promote scanning or glocal search, respectively, bypassing dopamine and glutamate-dependent behavioral state control. Multisite gating-dependent behavioral switch by GPCRs in tonic sensory circuits might represent a conserved regulatory logic for persistent behavioral state transitions enabling a flexible prioritization on the valance of multiple inputs.