Abstract. Let C be an algebraic geometric code of dimension k and length n constructed on a curve X over F q . Let s(C) be the state complexity of C and set w(C) := min{k, n−k}, the Wolf upper bound on s(C). We introduce a numerical function R that depends on the gonality sequence of X and show that s(C) ≥ w(C) − R(2g − 2), where g is the genus of X . As a matter of fact, R(2g − 2) ≤ g − (γ 2 − 2) with γ 2 being the gonality over F q of X , and thus in particular we have that s(C) ≥ w(C) − g + γ 2 − 2.