All animals rely on their ability to sense and respond to their environment to survive. However, the suitability of a behavioral response is context-dependent, and must reflect both an animal's life history and its present internal state. Based on the integration of these variables, an animal's needs can be prioritized to optimize survival strategies. Nociceptive sensory systems detect harmful stimuli and allow for the initiation of protective behavioral responses. The polymodal ASH sensory neurons are the primary nociceptors in C. elegans. We show here that the guanylyl cyclase ODR-1 functions non-cell-autonomously to downregulate ASH-mediated aversive behaviors and that ectopic cGMP generation in ASH is sufficient to dampen ASH sensitivity. We define a gap junction neural network that regulates nociception and propose that decentralized regulation of ASH signaling can allow for rapid correlation between an animal's internal state and its behavioral output, lending modulatory flexibility to this hard-wired nociceptive neural circuit.