Inflexible thinking is the tendency to get stuck on one way of seeing a situation, solving a problem, or responding to change, even when the evidence or circumstances call for a shift. Researchers call the broader capacity it reflects “cognitive flexibility,” and when that capacity is low, thinking becomes rigid. The pattern shows up across a surprising range of contexts, from clinical conditions like OCD and autism to everyday struggles with stress, aging, and diet. Understanding what drives inflexible thinking, and what loosens it, turns out to involve brain circuits, hormones, gut bacteria, and even political beliefs.
What Cognitive Flexibility Actually Means
Cognitive flexibility is not one single skill. Researchers break it into at least two distinct components. “Set-shifting” is the ability to switch your attention from one rule or category to another, like going from sorting objects by color to sorting them by shape. “Reversal learning” is the ability to update your behavior when something that used to be rewarded stops paying off, or vice versa. Both contribute to behavioral flexibility, but they rely on different brain systems and can be impaired independently.1PubMed. Acute stress impairs set-shifting but not reversal learning In primate research, depleting serotonin in the prefrontal cortex disrupted reversal learning but left set-shifting intact, which tells us these are genuinely separate processes sharing a label.2Journal of Neuroscience. Prefrontal Serotonin Depletion Affects Reversal Learning But Not Attentional Set Shifting
When people talk casually about “inflexible thinking,” they usually mean something that blends both: an inability to let go of an old strategy or perspective and adopt a new one. But the distinction matters because a person can be perfectly capable of one type of mental shifting and terrible at the other. A blanket diagnosis of “rigid thinker” often obscures what’s actually going on.
The Brain Circuits Behind Getting Stuck
The prefrontal cortex is the main orchestrator of flexible thought, but it does not work alone. A circuit connecting the medial prefrontal cortex to a reward-processing area called the nucleus accumbens plays a direct role in set-shifting. In rat studies, stimulating the projections from the prefrontal cortex to the nucleus accumbens improved performance on set-shifting tasks specifically by reducing perseverative errors, the kind of mistakes you make when you keep applying an old rule after it has stopped working.3PubMed Central. Frontostriatal regulation of brain circuits contributes to flexible decision making
In humans, neuroimaging of people with OCD has revealed a related finding. Reduced connectivity between the caudate nucleus and the ventrolateral prefrontal cortex was selectively linked to reduced cognitive flexibility.4PubMed Central. Specific Frontostriatal Circuits for Impaired Cognitive Flexibility and Goal-Directed Planning in Obsessive-Compulsive Disorder The caudate is part of the striatum, the same broader structure the rat studies pointed to. The picture that emerges is consistent: flexible thinking depends on how well the prefrontal cortex communicates with the striatum. When that conversation breaks down, thinking gets rigid.
Serotonin seems to be a key chemical messenger in this system, at least for reversal learning. When serotonin levels in the prefrontal cortex were selectively reduced in monkeys, they could still shift attention to a new dimension of a problem, but they could not stop choosing a previously rewarded option once it stopped paying off.5Journal of Neuroscience. Prefrontal Serotonin Depletion Affects Reversal Learning But Not Attentional Set Shifting This may help explain why certain psychiatric medications that affect serotonin can influence how stuck or flexible someone feels in their thinking patterns.
How Flexible Thinking Changes Across the Lifespan
Cognitive flexibility develops quickly in early childhood, ramping up during the preschool years and continuing to improve well into adolescence as the prefrontal cortex matures.6PubMed Central. Development and Plasticity of Cognitive Flexibility in Early and Middle Childhood But the trajectory is not a simple upward line. Research comparing preschoolers, school-age children, adolescents, and adults on hypothesis-testing tasks found something counterintuitive: in the physical domain, preschoolers were actually the most flexible learners. As children aged, they became less likely to adopt an unfamiliar hypothesis that fit the evidence, preferring instead to stick with a familiar one even when it was a worse match. In the social domain, both preschoolers and adolescents outperformed six-year-olds and adults in flexibility.7PubMed Central. Changes in cognitive flexibility and hypothesis search across human life history from childhood to adolescence to adulthood
That finding is worth sitting with. The common assumption is that cognitive ability just gets better with age until it starts declining. But for a certain kind of flexibility, very young children have an advantage precisely because they have fewer established assumptions to get stuck on. What looks like ignorance in a three-year-old may actually be openness. As we accumulate experience and strong priors about how the world works, we trade some raw flexibility for efficiency, defaulting to patterns that usually serve us well but occasionally trap us.
At the other end of life, cognitive flexibility declines with typical aging. A meta-analysis of brain imaging studies found that aging is associated with reduced flexibility and with changes in how the brain’s functional networks are organized and lateralized to support mental switching.8PubMed Central. A meta-analysis of cognitive flexibility in aging: Perspective from functional network and lateralization This does not mean every older adult becomes rigid in their thinking, but it does mean the underlying neural machinery requires more effort to do what it once did automatically.
Inflexible Thinking in Mental Health Conditions
Rigid thinking patterns show up prominently in several psychiatric and developmental conditions, though the way they appear differs.
In obsessive-compulsive disorder, the problem is not that people cannot learn what the correct response is. In one study, people with OCD performed just as well as healthy controls during a training phase where they learned which responses led to which outcomes. The breakdown came afterward: their knowledge of those outcomes was impaired, and they were more prone to “slips of action,” acting out of habit even when they knew the habit was no longer appropriate. The researchers described this as an overreliance on habit at the expense of goal-directed control.9PubMed Central. Disruption in the balance between goal-directed behavior and habit learning in obsessive-compulsive disorder People with OCD are not simply “stuck”; their brains are tilting the balance toward automatic behavior even when circumstances call for deliberate adjustment.
In autism spectrum conditions, inflexible thinking takes a different form. Compared to neurotypical individuals, people with ASD reported a stronger preference for predictability and higher levels of closed-mindedness, both of which were linked to lower cognitive flexibility.10PubMed. Need for closure and cognitive flexibility in individuals with autism spectrum disorder The desire for sameness and routine in autism appears to be at least partly a cognitive phenomenon, not just a behavioral quirk, tied to the way information is processed and categorized.
Anorexia nervosa is another condition where inflexible thinking has drawn research attention, but the findings are more nuanced than often reported. In adults with anorexia, studies have found measurably worse set-shifting compared to healthy controls. But in adolescents with the condition, the deficit often does not appear. Two separate studies found that adolescents with anorexia nervosa did not differ from controls on set-shifting tasks, despite the clear differences found in adults.11PubMed Central. Set Shifting Among Adolescents with Anorexia Nervosa12PubMed Central. Cognitive Set-Shifting in Anorexia Nervosa This raises the question of whether the inflexibility seen in adult anorexia is a consequence of years of illness rather than an underlying cause. Adding another layer, research on sisters of women with anorexia, some with the disorder and some without, found that both groups showed greater cognitive rigidity than unrelated healthy women, with the sisters not differing from each other. This pattern suggests some of the inflexibility may be a family trait, an endophenotype, rather than a product of the illness itself.13PubMed. Is impaired set-shifting an endophenotype of anorexia nervosa?
Depression, too, has been linked to inflexible thinking. A systematic review of 147 studies examined five components of flexibility, including set-shifting, emotional set-shifting, cardiac vagal control, explanatory flexibility, and coping flexibility, and found cross-sectional evidence linking reduced flexibility to depression. However, the review noted that few prospective studies have tested whether inflexibility actually predicts future depression or just accompanies it.14PubMed Central. Inflexibility as a Vulnerability to Depression: A Systematic Qualitative Review The chicken-and-egg question remains largely unresolved.
How Stress Makes Thinking Rigid
Stress is one of the most reliable ways to make thinking less flexible. Acute stress impairs set-shifting even while leaving reversal learning intact, which shows again that “flexibility” is not one monolithic thing that stress simply turns down.15PubMed. Acute stress impairs set-shifting but not reversal learning The mechanism appears to involve cortisol, the body’s primary stress hormone. Research has shown that cortisol increases are associated with better updating of information within a task but worse performance when switching between tasks with different demands.16PubMed. Stress and Cognitive Flexibility: Cortisol Increases Are Associated with Enhanced Updating but Impaired Switching Stress does not simply make you dumber; it narrows your cognitive repertoire. You get better at drilling into one thing and worse at pivoting to something else.
The story gets more complicated with chronic stress. In studies where participants faced an acute stressor, those who reported low or moderate chronic stress in their daily lives showed the expected pattern of becoming more perseverative under stress. But participants who reported already living with high chronic stress showed no change in perseveration after the acute stressor. Their flexibility was already low at baseline, so the additional stress had nothing left to impair.17PubMed Central. Perceived chronic stress influences the effect of acute stress on cognitive flexibility If you are already chronically stressed, your thinking may be more rigid than you realize, simply because the baseline has shifted.
Cortisol also appears to push behavior from goal-directed action toward habit. Two studies found that stress alone did not reliably shift people toward habitual behavior, but participants who showed a strong cortisol response to stress displayed prominent habitual responding compared to both non-responders and unstressed controls.18PubMed. Stress-induced reliance on habitual behavior is moderated by cortisol reactivity This connects to the OCD findings about overreliance on habit. The stress-habit pathway may be a general vulnerability that becomes extreme in certain clinical conditions.
Measuring Inflexibility Is Harder Than It Looks
The Wisconsin Card Sorting Test has been the go-to measure of cognitive flexibility in clinics and labs for decades. It asks people to sort cards by rules that change without warning, and the number of times they persist with an old rule is the key score.19PubMed. Considerations for using the Wisconsin Card Sorting Test to assess cognitive flexibility But relying on one test to diagnose rigid thinking comes with problems. Research comparing the WCST with a different flexibility measure, a cued task-switching paradigm, found that performance on the switching task did not predict WCST scores. What did predict WCST perseverative errors was working memory span, which is a distinct ability.20PubMed Central. Measuring cognitive flexibility in anorexia nervosa: Wisconsin Card Sorting Test versus cued task-switching
This means that some people who score poorly on the WCST may not actually be inflexible thinkers. They may have weak working memory, which causes them to lose track of the current rule. A clinician interpreting their score as pure inflexibility could be drawing the wrong conclusion. The lesson for anyone who has been told they are “cognitively rigid” based on a single task: the label may be oversimplified.
Psychological Inflexibility as a Therapy Target
Separate from the neuroscience tradition of measuring cognitive flexibility with card-sorting tasks, clinical psychology has developed its own concept: psychological inflexibility. This is defined as rigid responding to unpleasant thoughts and feelings in ways that interfere with well-being and the ability to act on personal values.21PubMed Central. The Relationship Between Psychological Inflexibility and Well-Being in Adults: A Meta-Analysis of the Acceptance and Action Questionnaire A psychologically inflexible person might avoid social situations because of anxious thoughts, or overeat to escape uncomfortable emotions, not because they cannot sort cards differently, but because they respond to inner experiences as if those experiences are facts that demand a fixed reaction.
Acceptance and commitment therapy, or ACT, was designed specifically to target psychological inflexibility. The approach teaches people to notice their thoughts without fusing with them, stay present rather than avoidant, and act according to values even when uncomfortable feelings are present. A range of randomized trials and meta-analyses support its effectiveness across different populations.22PubMed Central. Acceptance and Commitment Therapy and Psychological Well-Being: A Narrative Review In one trial, ACT outperformed a waitlist control for clinical perfectionism, a condition built on rigid self-standards, with improvements maintained at follow-up.23Journal of Obsessive-Compulsive and Related Disorders. A randomized controlled trial of acceptance and commitment therapy for clinical perfectionism Among earthquake-affected adolescents, an ACT-based group intervention produced large reductions in psychological inflexibility alongside reductions in anxiety and increases in resilience.24Turkish Journal of Traumatic Stress. Feasibility and Preliminary Outcomes of an Acceptance and Commitment Therapy (ACT)–Based Psychoeducational Group Intervention for Earthquake-Affected Adolescents
ACT’s processes have also been identified in overweight and obese populations, where psychological inflexibility manifests as experiential avoidance, cognitive fusion, poor contact with the present moment, unclear values, and lack of committed action. These processes have been associated with depression, anxiety, stress, and binge eating in this group.25PubMed. Psychological inflexibility in overweight and obese people from the perspective of acceptance and commitment therapy (ACT) The rigidity at play here is not about sorting cards. It is about how people relate to discomfort and whether they can act flexibly despite it.
Can You Train Your Brain to Be More Flexible?
Computerized “brain training” programs that promise to boost cognitive flexibility are popular, but the evidence is mixed at best. A study in healthy young adults found that game-based training that included both task-switching and attention components improved overall reaction times on a switching task, with some neural markers of improved response selection.26PubMed Central. Game-based training of flexibility and attention improves task-switch performance: near and far transfer of cognitive training in an EEG study But a more sobering result came from a multicenter randomized controlled trial with stroke patients. All three groups, including the training group, an active control group, and a waitlist group, improved over time on executive function measures, and the cognitive flexibility training produced no greater improvement than just waiting.27PLoS ONE. Brain training improves recovery after stroke but waiting list improves equally: A multicenter randomized controlled trial of a computer-based cognitive flexibility training Natural recovery and practice effects can mimic training benefits, which makes many claims in this space hard to trust.
Noninvasive brain stimulation techniques offer a different angle. Technologies like transcranial direct current stimulation (tDCS) and repetitive transcranial magnetic stimulation (rTMS) can modulate the neural circuits involved in flexibility. A review of these approaches found promising effects on cognitive switching and mental set-shifting across multiple techniques.28PubMed Central. How to Improve Cognitive Flexibility: Evidence From Noninvasive Neuromodulation Techniques In one study, mild electrical stimulation over the left prefrontal cortex helped participants generate more unusual uses for common objects, a creative flexibility task, suggesting that stimulation may work partly by loosening overly tight cognitive control.29PubMed Central. Noninvasive transcranial direct current stimulation over the left prefrontal cortex facilitates cognitive flexibility in tool use These technologies remain largely experimental for everyday use, but they reinforce the idea that inflexibility is not a fixed personality trait. It lives in adjustable brain activity.
The Bilingualism Question
One of the more debated lifestyle factors linked to cognitive flexibility is bilingualism. Some research has found that bilinguals show smaller “mixing costs” when switching between tasks, meaning they handle the general demand of keeping two task sets active better than monolinguals.30PubMed Central. Flexibility in task switching by monolinguals and bilinguals Other work has found reduced switching costs specifically, suggesting that the daily practice of toggling between languages carries over to non-linguistic mental shifting.31Bilingualism: Language and Cognition. A Bilingual Advantage in Task Switching
But the advantage may require years of language-switching practice to develop. A study of bilingual infants found no advantage on executive function tasks compared to monolingual infants, and neither current exposure to a second language nor proficiency predicted better performance.32Bilingualism: Language and Cognition. Effect of bilingualism on infants’ cognitive flexibility The researchers concluded that a bilingual advantage in flexibility may not emerge until children have accumulated significant experience with code switching. Being raised in a bilingual household is not an instant cognitive upgrade for a toddler; the benefits, if they materialize, seem to come from the accumulated practice of managing two active language systems over time.
When Rigid Thinking Has a Purpose
There is a tendency to frame inflexibility as purely bad, a deficiency to be fixed. But from an evolutionary standpoint, there may be conditions under which rigid thinking is adaptive. A framework published in Frontiers in Psychology argues that cognitive inflexibility can function as a threat response that has served humans throughout evolutionary history. Under conditions of strong group polarization, inflexibility creates what the authors call “rigid cognitive specialization,” a set of traits that allow people to operate efficiently within their social group even if that specialization makes them less effective outside it.33PubMed Central. A Framework on Polarization, Cognitive Inflexibility, and Rigid Cognitive Specialization
Think of it this way: in a stable, cooperative environment, flexibility is an asset because conditions change and you need to adapt. But in an environment of intergroup conflict, doubling down on your group’s norms, beliefs, and strategies makes you a more reliable ally. The cost is a narrower worldview. Relatedly, research into political psychology has found evidence linking cognitive rigidity to ideological extremism, partisanship, and dogmatism across both political and non-political belief systems.34Current Opinion in Behavioral Sciences. The role of cognitive rigidity in political ideologies: theory, evidence, and future directions This does not mean rigid thinkers are simply wrong about everything, but it does suggest that the strength of someone’s conviction and their resistance to updating it may reflect cognitive style as much as the evidence they have encountered.
Diet, Sleep, and the Gut
Some of the most unexpected research on inflexible thinking involves the gut microbiome. In animal studies, diets high in fat and sugar, resembling a Western diet, altered the composition of gut bacteria in ways that correlated with poorer cognitive flexibility. Specifically, higher levels of certain bacteria from the Clostridiales order and lower levels of Bacteroidales were associated with worse performance on reversal learning tasks.35PubMed. Relationships between diet-related changes in the gut microbiome and cognitive flexibility The mechanism by which gut bacteria influence cognition is still being worked out, likely involving inflammatory signaling and neurotransmitter precursors, but the association is strong enough that researchers have flagged it as a pathway through which diet may shape thinking patterns.
Sleep deprivation also affects flexibility, though not quite in the way you might expect. One study found that a night without sleep worsened attentional accuracy and speed but actually reduced reaction times on a task-switching test, suggesting that sleep loss may impair the attentional resources needed to set up a mental shift while not necessarily impairing the switching process itself.36PubMed Central. A night of sleep deprivation alters brain connectivity and affects specific executive functions In practical terms, if you have not slept, you are more likely to miss important cues that it is time to change your approach rather than being unable to change once you notice. The bottleneck is attention, not flexibility per se. That distinction matters because the fix for sleep-related rigidity is sleep, not flexibility exercises.

