Transitive inference (TI) is a reasoning capacity that allows individuals to deduce unknown pair relationships from previous knowledge of other pair relationships. Its occurrence in a wide range of animals, including insects, has been linked to their ecological needs. Thus, TI should be absent in species that do not rely on such inferences in their natural lives. We hypothesized that the latter applies to the cleaner wrasseLabroides dimidiatusand tested this with 19 individuals using a five-term series (A > B > C > D > E) experiment. Cleaners first learned to prefer a food-rewarding plate (+) over a non-rewarding plate (-) in four plate pairs that imply a hierarchy from plate A to plate E (A+B-, B+C-, C+D-, D+E-), with the learning order counterbalanced between subjects. We then tested for spontaneous preferences in the unknown pairs BD (transitive inference task) and AE (as a control for anchors), interspersed between trials involving a mix of all known adjacent pairs. The cleaners systematically preferred A over E and showed good performance for A+B- and D+E- trials. Conversely, cleaners did not prefer B over D. These results were unaffected by the reinforcement history, but the order of learning of the different pairs of plates had a main impact on the remembrance of the initial training pairs. Overall, cleaners performed randomly in B+C- and C+D- trials. Thus, a memory constraint may have prevented subjects from applying TI. Indeed, a parallel study on cleaner wrasse provided positive evidence for TI but was achieved following extensive training on the non-adjacent pairs which may have over-ridden the ecological relevance of the task.