https://www.selleckchem.com/products/sodium-oxamate.html A classic view of the striatum holds that activity in direct and indirect pathways oppositely modulates motor output. Whether this involves direct control of movement, or reflects a cognitive process underlying movement, remains unresolved. Here we find that strong, opponent control of behavior by the two pathways of the dorsomedial striatum depends on the cognitive requirements of a task. Furthermore, a latent state model (a hidden Markov model with generalized linear model observations) reveals that-even within a single task-the contribution of the two pathways to behavior is state dependent. Specifically, the two pathways have large contributions in one of two states associated with a strategy of evidence accumulation, compared to a state associated with a strategy of repeating previous choices. Thus, both the demands imposed by a task, as well as the internal state of mice when performing a task, determine whether dorsomedial striatum pathways provide strong and opponent control of behavior.The ability to accurately determine when to perform an action is a fundamental brain function and vital to adaptive behavior. The behavioral mechanism and neural circuit for action timing, however, remain largely unknown. Using a new, self-paced action timing task in mice, we found that deprivation of auditory, but not somatosensory or visual input, disrupts learned action timing. The hearing effect was dependent on the auditory feedback derived from the animal's own actions, rather than passive environmental cues. Neuronal activity in the secondary auditory cortex was found to be both correlated with and necessary for the proper execution of learned action timing. Closed-loop, action-dependent optogenetic stimulation of the specific task-related neuronal population within the secondary auditory cortex rescued the key features of learned action timing under auditory deprivation. These results unveil a previously underap