In psychology and psychiatry, perseveration is the repetition of a particular response, such as a word, phrase, or gesture, despite the absence or cessation of a stimulus, usually caused by brain injury or other organic disorder. Symptoms include "the inability to switch ideas along with the social context, as evidenced by the repetition of words or gestures after they have ceased to be socially relevant or appropriate,"  or the "act or task of doing so,"  and are not better described as stereotypy (a highly repetitive idiosyncratic behaviour).
In a broader sense it is used for a wide range of functionless behaviours that arise from a failure of the brain to either inhibitprepotent responses or to allow its usual progress to a different behavior, and includes impairment in set shifting and task switching in social and other contexts.
The primary definition of perseveration in biology and clinical psychiatry involves some form of response repetition or the inability to undertake set shifting (changing of goals, tasks or activities) as required, and is usually evidenced by behaviours such as words and gestures continuing to be repeated despite absence or cessation of a stimulus.
More broadly in clinical psychology, it describes mental or physical behaviours which are not excessive in terms of quantity but are apparently both functionless and involve a narrow range of behaviours, and are not better described as stereotypy (a highly repetitive idiosyncratic behaviour). In general English, perseveration (vb: "to perseverate") refers to insistent or redundant repetition, not necessarily in a clinical context.
Conditions and manifestations associated with perseveration
Perseveration of thought indicates an inability to switch ideas or responses. An example of perseveration is, during a conversation, if an issue has been fully explored and discussed to a point of resolution, it is not uncommon for something to trigger the reinvestigation of the matter. This can happen at any time during a conversation.
Several researchers have tried to connect perseveration with a lack of memory inhibition (the person repeats the answer because they have not been able to forget a past question and move on to the current subject); however, this connection could not be found, or was small.
^ abcMisdiagnosis And Dual Diagnoses Of Gifted Children And Adults: Adhd, Bipolar... - Webb, p.50-51]: Notes prior research into "hyperfocus" in ADHD, identifies it with "flow" in gifted children, observes that what is called hyperfocus in such cases "seems to be a less medical-sounding description of perseveration. Thus the apparent ability to concentrate in certain limited situations does not exclude the diagnosis of ADD/ADHD."
^STOP, LOOK, AND LISTEN: The Challenge for Children with ADHD - Meaux, Issues in comprehensive paediatric nursing, 2000, Vol. 23, No. 1 , Pages 1-13: Perseveration of ongoing responses means that the child with ADHD is less able to interrupt an ongoing response or response pattern to “stop and think,” resulting in behavior that is less flexible and less likely to change as the context of the situation changes