In order to respond to changing environments and fluctuations in internal states, animals adjust their behavior through diverse neuromodulatory mechanisms. In this study we show that electrical synapses between the ASH primary quinine-detecting sensory neurons and the neighboring ASK neurons are required for modulating the aversive response to the bitter tastant quinine in C. elegans. Mutant worms that lack the electrical synapse proteins INX-18 and INX-19 become hypersensitive to dilute quinine. Cell-specific rescue experiments indicate that inx-18
operates in ASK while inx-19
is required in both ASK and ASH for proper quinine sensitivity. Imaging analyses find that INX-19 in ASK and ASH localizes to the same regions in the nerve ring, suggesting that both sides of ASK-ASH electrical synapses contain INX-19. While inx-18
mutant animals have a similar behavioral phenotype, several lines of evidence suggest the proteins encoded by these genes play different roles in modulating the aversive quinine response. First, INX-18 and INX-19 localize to different regions of the nerve ring, indicating that they are not present in the same synapses. Second, removing inx-18
disrupts the distribution of INX-19, while removing inx-19
does not alter INX-18 localization. Finally, by using a fluorescent cGMP reporter, we find that INX-18 and INX-19 have distinct roles in establishing cGMP levels in ASK and ASH. Together, these results demonstrate that electrical synapses containing INX-18 and INX-19 facilitate modulation of ASH nociceptive signaling. Our findings support the idea that a network of electrical synapses mediates cGMP exchange between neurons, enabling modulation of sensory responses and behavior.