The performance of various AGC configurations namely presyne postsync and an adaptive (optimal) AGC are analyzed at and above threshold for a coherent pseudonoise (PN) second-order code tracking loop (delay lock loop, DLL) used in direct sequence spread spectrum systems. At and near threshold the criterion of performance is chosen to be the mean time to lose lock (MTLL). Applying a recently presented method, analytic expressions for the loop performance are given, and the threshold degradation caused by Doppler rate is derived. Above threshold, the “worst case” steady state tracking error is chosen as the loop index of performance. The performance and structure of the “globally-optimal” AGC (at and above threshold region) is derived, and a simplified, practical and still close to optimum adaptive AGC is presented. This configuration can easily be realized by digitally controlling the AGC parameters.