Context is important for sensory integration. Rather than simply considering sensory information independently, the brain integrates this information to inform behavior, however identifying this property at the single-neuron level is not trivial. In Caenorhabditis elegans, the paired interneurons AIBL and AIBR (AIB) have a compartmentalized organization of presynapses along its singular process. Sensory and sensory interneurons primarily synapse along the proximal process, while motor and motor interneurons synapse along the distal process. Since this neuron has graded potentials, the simplest model for AIB integration is simply a convolution of its presynaptic inputs. Through a series of experiments to manipulate sensory and motor input onto AIB, we find that while AIB activity is primarily a convolution of motor inputs, its sensory responses are not integrated independently. Instead, the gain in sensory input is a function of the temporal dynamics of motor input. Sensory information is reinforced when it matches the expected behavioral response. We find this property is also observed in other whole-brain datasets. Context-dependent behavioral responses to sensory input is well-documented. Here, we show this property can be localized to single neurons in the worm nervous system. This integration property likely plays an important role in context-dependent decision-making, as well as the highly variable dynamics of the worm nervous system.