27Caenorhabditis elegans egg laying is a two-state behavior modulated by sensory input. 28Feedback of egg accumulation in the uterus drives activity of the serotonergic HSN command 29 neurons to promote the active state, but how aversive sensory stimuli signal to inhibit egg laying 30 is not well understood. We find the Pertussis Toxin-sensitive G protein, Go, signals in HSN to 31 inhibit circuit activity and prolong the inactive behavior state. Go signaling hyperpolarizes HSN, 32reducing Ca 2+ activity and input into the postsynaptic vulval muscles. Loss of inhibitory Go 33 signaling uncouples presynaptic HSN activity from a postsynaptic, stretch-dependent homeostat, 34 causing precocious entry into the egg-laying active state. NLP-7 neuropeptides signal to reduce 35 egg laying both by inhibiting HSN and by activating Go in cells other than HSN. Thus, Go 36integrates diverse signals to maintain a bi-stable state of electrical excitability that dynamically 37 controls circuit activity and behavior output in response to a changing environment. 38 . 39 40 41 42 43 44 45 46 We have recently identified a stretch-dependent homeostat that scales egg-laying circuit 95 activity in response to feedback of egg accumulation. Juvenile and young adult animals lacking 96 eggs in the uterus have low circuit activity, and optogenetic stimulation of the HSNs is unable to 97 stimulate vulval muscle activity in these animals (Ravi et al., 2018a). Chemical or genetic 98 sterilization leads to a reduction in both HSN and vulval muscle Ca 2+ activity, locking animals in 99 the inactive state (Collins et al., 2016; Ravi et al., 2018a). Acute chemogenetic silencing of vulval 100 muscle electrical activity similarly blocks egg laying and presynaptic HSN Ca 2+ activity. Reversal 101 of this muscle silencing drives a homeostatic rebound in HSN 'burst' firing Ca 2+ activity where 102 'bursts' of HSN Ca 2+ transients promote ongoing circuit activity that drives release of the excess 103 accumulated eggs (Ravi et al., 2018a). Feedback of successful egg release also signals to inhibit 104 HSN activity. Four uv1 neuroendocrine cells which line the vulval canal are mechanically 105 activated by the passage of eggs. The uv1 cells are peptidergic and tyraminergic, and inhibition 106 of egg laying by tyramine requires the LGC-55 tyramine-gated Clchannel which is expressed 107 on the HSNs (Collins et al., 2016). uv1 also expresses the FLP-11 and NLP-7 neuropeptides 108 that signal to inhibit HSN activity and egg laying through receptors that remain unidentified 109 (Banerjee et al., 2017). Full NLP-7 inhibition of egg laying requires the EGL-47 receptor and the 110 G protein, Go, both of which are expressed in HSN (Moresco and Koelle, 2004; Banerjee et al., 111 2017). HSN Ca 2+ activity and egg laying are also inhibited by aversive signals from the external 112 environment. Elevated environmental CO2 activates BAG and other sensory neurons (Hallem et 113 al., 2011;Fenk and de Bono, 2015). BAG releases FLP-17, which binds to EGL-6 recepto...