This article deals with partial discharge (PD) measurement on power cables while they are in operation (online monitoring). In terms of sensitivity, high-frequency current transformers (HFCTs) are the most suitable sensors for this task, but they are prone to magnetic saturation when monitoring power cables online. To counteract saturation, the magnetic ring core of the HFCT is usually split into two halves to create air gaps. We show that a variable air gap length is required to maximize the HFCT sensitivity, and that the optimal air gap length depends on the actual operating point of the power cable. Accordingly, we present a concept for the construction of an HFCT capable of self-adjusting its air gap length during operation. The air gap control strategy is explained in detail and tested with a prototype. In addition, we propose a method for PD detection based on a combination of an analog peak detector circuit followed by a software algorithm. The developed PD sensor is immune to magnetic saturation, always operates at its optimum operating point and can therefore detect PD pulses with much higher sensitivity than comparable sensors with a fixed air gap length. Our tests prove that the sensor system works as intended and will be further improved in the future.