Deficits in set shifting tasks are present in anorexia nervosa (AN), but it is not known whether these deficits are traits independent of current disease or nutritional status or merely a temporary consequence of starvation or psychopathology. The aims of the present study were to determine if set-shifting sub-optimal performance are state or trait-related by examining set shifting in patients with current or past AN, and the extent of association of these deficits with obsessive compulsive traits and behaviours. To achieve this we examined set shifting abilities in three groups of subjects: (a) AN patients with current illness, prior to receiving treatment (AN); (b) people with past AN currently in long term recovery (ANRec) and a healthy comparison group (HC). We also longitudinally followed up a subset for the AN group who showed weight recovery in response to in patient treatment (ANWR). We administered a group of set shifting tests, which included cognitive, perceptual and motor shifting tasks. A semi-structured interview was obtained to ascertain obsessive compulsive personality disorder (OCPD) traits as a child and adult. Set-shifting difficulties were observed in the AN group, but to a lesser extent in the ANRec group. In the AN group these difficulties did not show any improvement follow re-testing after weight recovery. Performance on set shifting tasks was associated with childhood rigidity and inflexibility. Some aspects of set shifting sub-optimal performance in AN appear to be a trait rather than a state marker.